public interface IServer
IServer
interface defines all the methods necessary for the server to communicate with a client.Modifier and Type | Method and Description |
---|---|
void |
sendFinishedNotification(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
Sends a FinishedNotification to the clients, informing them about the end of the game
|
void |
sendGameContinueNotification(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
Sends a ContinueNotification to the clients, acknowledging them that the game continues
|
void |
sendGamePauseNotification(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
Sends a PauseNotification to the clients, acknowledging them that the game was paused by the host
|
void |
sendGameStartNotification(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
Used at the beginning of a game to inform all Clients about the game start.
|
void |
sendGameStateNotification(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
Sends a GameStateNotification to the clients.
|
void |
sendKickNotification(de.smarten.tsuro.shared.gamemodel.GameModel gameModel,
List<de.smarten.tsuro.shared.gamemodel.Player> playerList)
Sends a KickNotification to the clients, telling them that one or more players lost the game
|
void |
sendTurnNotification(de.smarten.tsuro.shared.gamemodel.GameModel gameModel,
boolean setToken)
Sends a TurnNotification to the clients, notifying them about the beginning of a new turn
|
void sendGamePauseNotification(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
gameModel
- the GameModel of the game in which the clients shall be notifiedvoid sendGameContinueNotification(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
gameModel
- the GameModel of the game in which the clients shall be notifiedvoid sendFinishedNotification(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
gameModel
- the GameModel of the game in which the clients shall be notifiedvoid sendGameStateNotification(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
gameModel
- the GameModel of the game in which the clients shall be notifiedvoid sendKickNotification(de.smarten.tsuro.shared.gamemodel.GameModel gameModel, List<de.smarten.tsuro.shared.gamemodel.Player> playerList)
gameModel
- the GameModel of the game in which the clients shall be notifiedplayerList
- the list of players who were kickedvoid sendTurnNotification(de.smarten.tsuro.shared.gamemodel.GameModel gameModel, boolean setToken)
gameModel
- the GameModel of the game in which the clients shall be notifiedsetToken
- whether to ask the client for a token position instead of a placementvoid sendGameStartNotification(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
gameModel
- the GameModel of the game in which the clients shall be notifiedCopyright © 2017 smarTen. All rights reserved.