- All Superinterfaces:
Serializable
- All Known Implementing Classes:
Room
Interface representing a game room.
It is possible to check the players currently in the room, whether the game has started and whether the room is currently room.
Moreover, it can be retrieved the immutable parameters gameId and nPlayersTarget
-
Method Summary
Modifier and TypeMethodDescriptionint
int
boolean
-
Method Details
-
getPlayers
List<PlayerLobby> getPlayers()- Returns:
- List of players currently in this room
-
getPlayersInGame
List<PlayerLobby> getPlayersInGame()- Returns:
- List of players that are in the game. If the game has not started yet, it corresponds to the players currently in the room
-
getGameId
int getGameId()- Returns:
- GameId for the room
-
getnPlayersTarget
int getnPlayersTarget()- Returns:
- Target number of players to reach in order to start the game
-
isGameStarted
boolean isGameStarted()- Returns:
- Flag indicating if the game for this room is started or not. It can change only once, the unique time the room gets full (making the game start)
-