|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jogre.common.playerstate.PlayerState | +--org.jogre.common.playerstate.PlayerStateViewing
State object for a viewing player state.
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(PlayerList players)
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(PlayerList players)
Returns true if a user can stand. |
boolean |
canStart(PlayerList players)
Returns true if a user can hit the start. |
String |
flatten()
Transmit the player state as an Integer. |
int |
intValue()
Integer label of this state (see constants of this class). |
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 |
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 PlayerState
PlayerState.sit()
public boolean canSit(PlayerList players)
canSit
in class PlayerState
PlayerState.canSit(org.jogre.common.PlayerList)
public PlayerState stand()
PlayerState
stand
in class PlayerState
org.jogre.common.playerstate.PlayerState
public PlayerState start()
PlayerState
start
in class PlayerState
org.jogre.common.playerstate.PlayerState
public boolean canStand(PlayerList players)
PlayerState
canStand
in class PlayerState
org.jogre.common.playerstate.PlayerState
players
- List of players.public boolean canStart(PlayerList players)
PlayerState
canStart
in class PlayerState
org.jogre.common.playerstate.PlayerState
players
- List of players.public boolean canOfferDrawResign()
PlayerState
canOfferDrawResign
in class PlayerState
org.jogre.common.playerstate.PlayerState
public String flatten()
ITransmittable.flatten()
public int intValue()
PlayerState
intValue
in class PlayerState
PlayerState.intValue()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |