|
||||||||
| 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.HumanSelection
HumanSelection synchronises the interaction between the
Game and ActionPane when the user must make a
selection on their next move. The Game thread activates the
buttons in the ActionPane if a certain selection is possible.
This is done through the Human class. Once all checks have been
run the Game thread waits in this class until the user has made
their selection.
| Field Summary | |
(package private) boolean |
selected
Flag to signal that the player has made their selection. |
(package private) int |
selection
Player's selected move. |
| Constructor Summary | |
HumanSelection()
|
|
| Method Summary | |
int |
getPlayerSelection()
Used by the Game thread to retrieve the users selection. |
void |
setSelection(int selection)
Is used to store the selection of the user, that will be retrieved by the Game thread. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
boolean selected
int selection
| Constructor Detail |
public HumanSelection()
| Method Detail |
public int getPlayerSelection()
Game thread to retrieve the users selection.
Once the user has made a selection in the ActionPane,
it is sent to this class. The thread is notified and returns the
selection.
public void setSelection(int selection)
Game thread. This is associated
with the getPlayerSelection() function, which is notified
when this is run and a selection has been placed.selection - The player's selection.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||