Package it.polimi.ingsw.network.client
Class GuiTurnManager
java.lang.Object
it.polimi.ingsw.network.client.GuiTurnManager
- All Implemented Interfaces:
ClientTurnManagerInterface
public class GuiTurnManager extends java.lang.Object implements ClientTurnManagerInterface
Class instantiated once a game is played in GUI configuration.
Manages turns client side
-
Constructor Summary
Constructors Constructor Description GuiTurnManager(Client client, ViewInterface view)Constructor for GuiTurnManager class -
Method Summary
Modifier and Type Method Description voidcurrentPhasePrint()Manages the possible actions based on the current phasejava.lang.StringgetCurrentPlayer()Returns the username of the current playervoidsetCurrentPlayer(java.lang.String currentPlayer)Sets the String passed as parameter as current playervoidsetStateIsPlayerChanged(TurnState newState)set new phase and new currentPlayerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
GuiTurnManager
Constructor for GuiTurnManager class- Parameters:
client- , client's interfaceview- , instance of ViewInterface used to display
-
-
Method Details
-
currentPhasePrint
public void currentPhasePrint()Description copied from interface:ClientTurnManagerInterfaceManages the possible actions based on the current phase- Specified by:
currentPhasePrintin interfaceClientTurnManagerInterface
-
getCurrentPlayer
public java.lang.String getCurrentPlayer()Description copied from interface:ClientTurnManagerInterfaceReturns the username of the current player- Specified by:
getCurrentPlayerin interfaceClientTurnManagerInterface- Returns:
- the username of the current player
-
setCurrentPlayer
public void setCurrentPlayer(java.lang.String currentPlayer)Description copied from interface:ClientTurnManagerInterfaceSets the String passed as parameter as current player- Specified by:
setCurrentPlayerin interfaceClientTurnManagerInterface- Parameters:
currentPlayer- , username of the player that will be the current
-
setStateIsPlayerChanged
Description copied from interface:ClientTurnManagerInterfaceset new phase and new currentPlayer- Specified by:
setStateIsPlayerChangedin interfaceClientTurnManagerInterface- Parameters:
newState- the new Turn State
-