|
||||||||
| 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.RetrieveSelection
RetrieveSelection synchronises the interaction between
Referee and the Game. Once all selections
have been sent by the Game to the Referee
it will call on this to wait for the selection determined to have the
highest priority.
| Field Summary | |
private int |
currentPlayer
Winning player- now becomes the current player. |
private boolean |
exit
Exit flag. |
private boolean |
resultAvail
Flag to signal that winning move has been placed. |
private int |
winningSelection
Winning selection |
| Constructor Summary | |
RetrieveSelection()
|
|
| Method Summary | |
int |
getBestSelection()
Returns the selection of the player who was given the highest priority. |
int |
getResult()
Waits until a result is able to be made available and returns the player's position with the highest priority. |
void |
initTurn()
Class initialisation- run after every move to clear selections. |
void |
placeResult(int winningSelection,
int currentPlayer,
boolean exit)
Inserts a winning player and their selection. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private int winningSelection
private boolean resultAvail
private int currentPlayer
private boolean exit
| Constructor Detail |
public RetrieveSelection()
| Method Detail |
public void initTurn()
public void placeResult(int winningSelection,
int currentPlayer,
boolean exit)
winningSelection - Players selection.currentPlayer - The new current player.exit - Exit flag.public int getResult()
public int getBestSelection()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||