java.lang.Object
it.polimi.ingsw.view.inputManagers.InputManager
it.polimi.ingsw.view.inputManagers.GodChoiceInputManager
public class GodChoiceInputManager extends InputManager
Handles inputs regarding the god choice and the match reload
-
Field Summary
Fields inherited from class it.polimi.ingsw.view.inputManagers.InputManager
client, inputCountdown, isWaitingForInput, view
-
Constructor Summary
Constructors Constructor Description GodChoiceInputManager(Client client, java.util.List<GodData> availableGods, int godsToChoose)
Constructor to be called to manage gods choice -
Method Summary
Modifier and Type Method Description void
manageInput(java.lang.String input)
Determines how to handle the received input based on the internal state CHOOSE_INITIAL_GODS: the lobby owner has to choose the gods for all of the players CHOOSE_PERSONAL_GOD: the user has to choose its own godMethods inherited from class it.polimi.ingsw.view.inputManagers.InputManager
cleanInput, setWaitingForInput, startTimer, stopTimer
-
Constructor Details
-
GodChoiceInputManager
public GodChoiceInputManager(Client client, java.util.List<GodData> availableGods, int godsToChoose)Constructor to be called to manage gods choice- Parameters:
client
- the client to manage the inputs foravailableGods
- the list of gods to choose fromgodsToChoose
- the number of gods to choose
-
-
Method Details
-
manageInput
public void manageInput(java.lang.String input)Determines how to handle the received input based on the internal state- CHOOSE_INITIAL_GODS: the lobby owner has to choose the gods for all of the players
- CHOOSE_PERSONAL_GOD: the user has to choose its own god
- Specified by:
manageInput
in classInputManager
- Parameters:
input
- the user input
-