public interface IObserverGUIControl
IObserverGUIControl
defines methods for
interactions that are relevant for the GUI.Modifier and Type | Method and Description |
---|---|
void |
displayLosses(List<de.smarten.tsuro.shared.gamemodel.Player> pKickedPlayers)
The method tells the GUI to display the kicked players in
|
void |
joinGame(int gameId,
String name,
de.smarten.tsuro.shared.gamemodel.Role role)
This method is called when the user wants to register with a game after he entered the necessary information
|
void |
notifyCancel()
The method tells the GUI to display that the game has been cancelled.
|
void |
notifyContinue()
The method tells the GUI to display that the game has been continued.
|
void |
notifyFinish()
The method tells the GUI to display that the game has been finished.
|
void |
notifyKick(String kickedPlayersMsg)
Displays the kicked players on the GUI.
|
void |
notifyPause()
The method tells the GUI to display that the game has been paused.
|
void |
registerClicked(String pNetworkAddress)
This method is called when the user wants to connect (indicated by pressing the register button) with a
server after entering a network address.
|
void |
requestGameList()
Forwards request for GameList to the client control.
|
void |
setError(String pError,
String errorSource)
Receives an error message and the source of the error (e.g.
|
void |
setGameList(List<de.smarten.tsuro.shared.gamemodel.Game> pGameList)
Receives a List of Game objects and forwards this list to the gui for displaying it.
|
void |
setGameModel(de.smarten.tsuro.shared.gamemodel.GameModel gameModel)
This method sets the GameModel variable of this class.
|
void |
setMessage(String pMessage,
String messageSource)
Receives an message and the source of the error (e.g.
|
void |
showGameList()
Tells the GUI to display the gamelistwindow.
|
void setGameModel(de.smarten.tsuro.shared.gamemodel.GameModel gameModel) throws Exception
gameModel
- gameModel that represents the game the spectator would like to watchpClientId
- the clientID of the current gameException
- if the GameModel variable can't be setvoid setGameList(List<de.smarten.tsuro.shared.gamemodel.Game> pGameList)
pGameList
- List with Game objects that are currently available for joiningvoid setError(String pError, String errorSource)
pError
- the error message to be displayederrorSource
- the source where the error occuredvoid setMessage(String pMessage, String messageSource)
pMessage
- the message to be displayedmessageSource
- the source where the message came fromvoid registerClicked(String pNetworkAddress)
pNetworkAddress
- The network address to be connected to and was entered by the user in beforevoid joinGame(int gameId, String name, de.smarten.tsuro.shared.gamemodel.Role role)
gameId
- the ID of the game the client would like to join (-1 if client wants to join general game pool)name
- the name of the client uservoid notifyPause()
void notifyContinue()
void notifyFinish()
void notifyKick(String kickedPlayersMsg)
kickedPlayersMsg
- the list of players that were kickedvoid notifyCancel()
void displayLosses(List<de.smarten.tsuro.shared.gamemodel.Player> pKickedPlayers)
pKickedPlayers
- List of the players that have been kicked.void requestGameList()
void showGameList()
Copyright © 2017 smarTen. All rights reserved.