|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the interface that represents the server from the client's point of view.
Method Summary | |
void |
abortAction(long actionId)
Abort an action that has previously been asked to be executed. |
boolean |
connect(String host,
int port)
Try to connect to the given host and port. |
void |
disconnect()
Disconnects from the server. |
long |
doAction(int pieceHandle,
Action a)
Execute the given Action and return a unique id of that executing action. |
Set |
getAvailableRoles()
After a connection has been established, call this to get the available roles. |
BufferedImage |
getMap()
Returns the map of the game. |
boolean |
joinAsRole(String role)
Join the game as the given role. |
void |
startGame()
Called by the client when it is ready to start receiving game messages from the server. |
Method Detail |
public boolean connect(String host, int port)
host
- Description of Parameterport
- Description of Parameterpublic void disconnect()
public Set getAvailableRoles()
public boolean joinAsRole(String role)
role
- Description of Parameterpublic BufferedImage getMap()
public void startGame()
public long doAction(int pieceHandle, Action a)
pieceHandle
- Description of Parametera
- Description of Parameterpublic void abortAction(long actionId)
actionId
- Description of Parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |