|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface provides a common means to control any Risk client whether it be the graphical client or a robot player. Only asyncronous action are listed in this interface. Information that would be better modeled as methods return values are modeled as such and this is handled by the Network sub-system.
Method Summary | |
void |
gameOver(Player victor)
Called when the game is won. |
void |
gameOver(Player player,
java.lang.String reason)
Called when the game is stopped by the server. |
void |
lostPlayer(Player player)
Called when a player leaves the game (or if his connection is timed out). |
void |
message(java.lang.String message)
Message sent over the chat system to all clients. |
void |
newGame(Player[] players)
Called when the games owner decides to stop waiting for new players and start playing. |
void |
newPlayer(Player player)
Called when a new player has joined the game the client is waiting to play |
void |
newSpectator(Player player)
Called whenever a new spectator has joined the game. |
void |
select(java.lang.String country)
Select the supplied country. |
void |
setArmies(java.lang.String country,
int a)
Set the number of armies in a country. |
void |
setCards(Card[] cards)
Tell the client the cards that the player has. |
void |
setDice(int[] die)
Supply the current state of the dice to those it interests. |
void |
setOwner(java.lang.String country,
Player player)
Set the owner of the country to the player. |
void |
setTurn(Player player)
It is player's turn |
void |
showStatus(java.lang.String status)
Display the supplied string in the clients status line. |
Method Detail |
public void newPlayer(Player player)
public void newSpectator(Player player)
public void lostPlayer(Player player)
public void newGame(Player[] players)
public void gameOver(Player victor)
public void gameOver(Player player, java.lang.String reason)
public void message(java.lang.String message)
public void setTurn(Player player)
public void showStatus(java.lang.String status)
public void setArmies(java.lang.String country, int a)
public void setOwner(java.lang.String country, Player player)
public void select(java.lang.String country)
public void setDice(int[] die)
public void setCards(Card[] cards)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |