org.jogre.common.playerstate
Class PlayerStateReady

java.lang.Object
  extended byorg.jogre.common.playerstate.PlayerState
      extended byorg.jogre.common.playerstate.PlayerStateReady

public class PlayerStateReady
extends PlayerState

State object for a player ready state.

Version:
Alpha 0.2.3
Author:
Bob Marks

Field Summary
 
Fields inherited from class org.jogre.common.playerstate.PlayerState
GAME_STARTED, READY_TO_START, SEATED, VIEWING
 
Constructor Summary
PlayerStateReady()
           
 
Method Summary
 boolean canOfferDrawResign()
          Returns true if a user can offer a draw or resign.
 boolean canSit(Table table)
          Returns true if a user can sit.
 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()
          Abstract method which defines what a player can do when they sit.
 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

PlayerStateReady

public PlayerStateReady()
Method Detail

sit

public PlayerState sit()
Description copied from class: PlayerState
Abstract method which defines what a player can do when they sit.

Specified by:
sit in class PlayerState
Returns:
PlayerState object.

stand

public PlayerState stand()
Description copied from class: PlayerState
Abstract method which defines what a player can do when they stand up.

Specified by:
stand in class PlayerState
Returns:
PlayerState object.

start

public PlayerState start()
Description copied from class: PlayerState
Abstract method which defines what a player can do when they start.

Specified by:
start in class PlayerState
Returns:
PlayerState object.

canSit

public boolean canSit(Table table)
Description copied from class: PlayerState
Returns true if a user can sit.

Specified by:
canSit in class PlayerState
Parameters:
table - Link to the table
Returns:
True if player can sit down.

canStand

public boolean canStand(Table table)
Description copied from class: PlayerState
Returns true if a user can stand.

Specified by:
canStand in class PlayerState
Parameters:
table - Link to the table
Returns:
True if player can stand up.

canStart

public boolean canStart(Table table,
                        Game game)
Description copied from class: PlayerState
Returns true if a user can hit the start.

Specified by:
canStart in class PlayerState
Parameters:
table - Link to the table
game - Link to the game.
Returns:
True if player can start.

canOfferDrawResign

public boolean canOfferDrawResign()
Description copied from class: PlayerState
Returns true if a user can offer a draw or resign.

Specified by:
canOfferDrawResign in class PlayerState
Returns:
True if player offer a draw or resign.

stringValue

public String stringValue()
Description copied from class: PlayerState
Integer label of this state (see constants of this class).

Specified by:
stringValue in class PlayerState
Returns:
String value of this state.
See Also:
org.jogre.common.playerstate.PlayerState#intValue()

toString

public String toString()