|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Implementations of this class can be registered in
the Player
and will receive events upon player actions.
Field Summary | |
static int |
LOCAL_GIVE_UP
Constant denoting a game exit on local user giving up |
static int |
LOCAL_QUIT
Constant denoting a game exit on user quitting |
static int |
REMOTE_GIVE_UP
Constant denoting a game exit on remote user giving up |
static int |
REMOTE_QUIT
Constant denoting a game exit on remote user quitting |
Method Summary | |
void |
gameExited(int id,
int reason)
Called when player exits the game for some reason. |
void |
messageSent(int id,
char[] msg)
Called when player sent a message. |
void |
moveMade(int id,
int moveIndex)
Called when a player performs a move. |
void |
turnCommit(int id)
Called when player is finished with his/her turn. |
void |
undoPerformed(int id)
Called when player performs an undo. |
Field Detail |
public static final int LOCAL_QUIT
public static final int REMOTE_QUIT
public static final int LOCAL_GIVE_UP
public static final int REMOTE_GIVE_UP
Method Detail |
public void moveMade(int id, int moveIndex)
id
- Player id.moveIndex
- The moveindex in possible move array used for move.public void undoPerformed(int id)
id
- Player id.public void turnCommit(int id)
id
- Player id.public void messageSent(int id, char[] msg)
id
- Player id.msg
- The message.public void gameExited(int id, int reason)
id
- Player id.reason
- The reason for exiting game.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |