|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jogre.common.playerstate.PlayerState
org.jogre.common.playerstate.PlayerStateViewing
State object for a viewing player state.
| Field Summary |
| Fields inherited from class org.jogre.common.playerstate.PlayerState |
GAME_STARTED, READY_TO_START, SEATED, VIEWING |
| Constructor Summary | |
PlayerStateViewing()
|
|
| Method Summary | |
boolean |
canOfferDrawResign()
Returns true if a user can offer a draw or resign. |
boolean |
canSit(Table table)
A player can sit if the number of players already seated isn't greater than the maximum number of players allowed in this game. |
boolean |
canStand(Table table)
Returns true if a user can stand. |
boolean |
canStart(Table table,
Game game)
Returns true if a user can hit the start. |
PlayerState |
sit()
If a player sits the state changes to seated. |
PlayerState |
stand()
Abstract method which defines what a player can do when they stand up. |
PlayerState |
start()
Abstract method which defines what a player can do when they start. |
String |
stringValue()
Integer label of this state (see constants of this class). |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PlayerStateViewing()
| Method Detail |
public PlayerState sit()
sit in class PlayerStatePlayerState.sit()public boolean canSit(Table table)
canSit in class PlayerStatetable - Link to the table
org.jogre.common.playerstate.PlayerState#canSit(org.jogre.common.PlayerList)public PlayerState stand()
PlayerState
stand in class PlayerStatepublic PlayerState start()
PlayerState
start in class PlayerStatepublic boolean canStand(Table table)
PlayerState
canStand in class PlayerStatetable - Link to the table
public boolean canStart(Table table,
Game game)
PlayerState
canStart in class PlayerStatetable - Link to the tablegame - Link to the game.
public boolean canOfferDrawResign()
PlayerState
canOfferDrawResign in class PlayerStatepublic String stringValue()
PlayerState
stringValue in class PlayerStateorg.jogre.common.playerstate.PlayerState#intValue()public String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||