|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
All actions that can be performed on the server.
Method Summary | |
void |
cards(Card[] cards)
Exchange the supplied cards for armies. |
void |
closeConnection()
Close the current connection. |
void |
countryClicked(java.lang.String country)
Inform the server that a country has been clicked on. |
void |
finishTurn()
Complete the current turn. |
void |
fortify()
Change into fortify mode. |
boolean |
isConnected()
Test whether or not we are connected to a server. |
void |
joinGame(java.lang.String gamename)
Join an existing game of Risk |
void |
message(java.lang.String message)
Send a message to all players. |
void |
message(java.lang.String message,
Player player)
Send a message to the named player. |
void |
newGame(java.lang.String gamename,
boolean random,
boolean privacy)
Start a new game of risk with the supplied name |
void |
openConnection(java.lang.String hostname,
int port,
Player player)
Open a connection to the server. |
void |
startGame()
Start the game of risk. |
void |
stopGame(java.lang.String reason)
Stop the current game of risk. |
Method Detail |
public void openConnection(java.lang.String hostname, int port, Player player) throws java.io.IOException
java.io.IOException
public void closeConnection() throws java.io.IOException
java.io.IOException
public boolean isConnected()
public void newGame(java.lang.String gamename, boolean random, boolean privacy)
random
- start with randomly owned countriesprivacy
- permit private talking on the message systempublic void joinGame(java.lang.String gamename)
public void startGame()
public void stopGame(java.lang.String reason)
reason
- the reason for the game being haltedpublic void message(java.lang.String message)
message
- the messagepublic void message(java.lang.String message, Player player)
message
- the messageplayer
- the player to send the message topublic void countryClicked(java.lang.String country)
country
- string giving the country that was clicked on.public void cards(Card[] cards)
cards
- the card to be exchangedpublic void fortify()
public void finishTurn()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |