Package it.polimi.ingsw.view
Interface ClientStateViewer
- All Known Implementing Classes:
ClientModelState
public interface ClientStateViewer
Interface that enables querying on client side model state
-
Method Summary
Modifier and Type Method Description intgetPlayerTurnPosition()Returns the position that this client has in the turn listSimpleGameStategetSimpleGameState()Returns the SimpleGameStateSimplePlayerStategetSimplePlayerState()Returns this client's SimplePlayerStateSimplePlayerStategetSimplePlayerState(java.lang.String username)Returns the SimplePlayerState belonging to the specified playerjava.lang.StringgetUsername()Returns this client's usernamejava.util.List<java.lang.String>otherPlayersUsername()Returns the username list of the players in the game excluded this client's onejava.util.List<java.lang.String>usernameList()Returns the username list of the players in the game
-
Method Details
-
getSimplePlayerState
SimplePlayerState getSimplePlayerState()Returns this client's SimplePlayerState- Returns:
- this client's SimplePlayerState
-
getSimplePlayerState
Returns the SimplePlayerState belonging to the specified player- Parameters:
username- , the username of the players whose SimplePlayerState is to be returned- Returns:
- the specified player's SimplePlayerState
-
getSimpleGameState
SimpleGameState getSimpleGameState()Returns the SimpleGameState- Returns:
- the SimpleGameState
-
usernameList
java.util.List<java.lang.String> usernameList()Returns the username list of the players in the game- Returns:
- the username list of the players in the game
-
otherPlayersUsername
java.util.List<java.lang.String> otherPlayersUsername()Returns the username list of the players in the game excluded this client's one- Returns:
- the username list of the players in the game excluded this client's one
-
getPlayerTurnPosition
int getPlayerTurnPosition()Returns the position that this client has in the turn list- Returns:
- the position that this client has in the turn list
-
getUsername
java.lang.String getUsername()Returns this client's username- Returns:
- this client's username
-