|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--au.com.solidsoftware.multimahjong.mmc.game.RetrieveMove
RetrieveMove synchronises the interaction between
Referee and the Game. When a discard tile
is required to be received from another MMC, the Game waits
in this class to receive the move.
| Field Summary | |
private Moves |
currentMove
Holds tile associated with the current player's move. |
private boolean |
exit
Exit flag |
private boolean |
stillRevealing
Flag to signify current player still deciding whether to reveal tiles. |
private boolean |
tileAvailable
Flag to signify change of discard. |
| Constructor Summary | |
RetrieveMove()
Class Constructor. |
|
| Method Summary | |
Moves |
getPlayerAction()
Synchronised method that waits on placePlayerAction for the
current player to make a move. |
void |
initMove()
Initialise tile available and stillRevealing flags. |
boolean |
isRevealing()
Returns isRevealing flag. |
void |
placePlayerAction(Moves givenMove,
int action,
boolean exit)
Places the current player's tile and the associated action. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private Moves currentMove
private boolean tileAvailable
private boolean stillRevealing
private boolean exit
| Constructor Detail |
public RetrieveMove()
| Method Detail |
public void initMove()
public void placePlayerAction(Moves givenMove,
int action,
boolean exit)
placePlayerAction. Once
the move is placed the Game is notified.givenMove - Class containing the tile corresponding to the given
action.action - Player's selected action.exit - Exit flag.public Moves getPlayerAction()
placePlayerAction for the
current player to make a move. The Referee sends the
move to this class where it is retrieved by the Game.public boolean isRevealing()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||