Module AM37

Class GodChoiceInputManager

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 god

    Methods inherited from class it.polimi.ingsw.view.inputManagers.InputManager

    cleanInput, setWaitingForInput, startTimer, stopTimer

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 for
      availableGods - the list of gods to choose from
      godsToChoose - 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 class InputManager
      Parameters:
      input - the user input