Package com.mg105.interface_adapters
Class InputInterpreter
java.lang.Object
com.mg105.interface_adapters.InputInterpreter
InputInterpreter takes in keyboard inputs and distributes them to their appropriate use cases.
-
Constructor Summary
ConstructorDescriptionInputInterpreter
(@NotNull CharacterMoverInterface mover, @NotNull Toggler toggler, @NotNull TutorialTextController textChanger, @NotNull ChestInteractor chestInteractor, @NotNull OpponentSetInteractor opponentInteractor) Create a new InputInterpreter that translates keyboard inputs to appropriate function invocations. -
Method Summary
-
Constructor Details
-
InputInterpreter
public InputInterpreter(@NotNull @NotNull CharacterMoverInterface mover, @NotNull @NotNull Toggler toggler, @NotNull @NotNull TutorialTextController textChanger, @NotNull @NotNull ChestInteractor chestInteractor, @NotNull @NotNull OpponentSetInteractor opponentInteractor) Create a new InputInterpreter that translates keyboard inputs to appropriate function invocations.- Parameters:
mover
- the character mover.toggler
- the toggler used to change the displayed interface.textChanger
- the text controller for tutorialchestInteractor
- the ChestInteractor used to interact with chests.opponentInteractor
- the interactor used to interact with opponents.
-
-
Method Details
-
interpret
Interpret key being pressed as an action.- Parameters:
key
- the key being pressed as a string.
-