com.asdf.plugins.pokergames.texasholdem
Class TexasHoldemStage

java.lang.Object
  extended by com.asdf.plugins.pokergames.texasholdem.TexasHoldemStage
All Implemented Interfaces:
Stage

public class TexasHoldemStage
extends java.lang.Object
implements Stage


Nested Class Summary
static class TexasHoldemStage.TexasHoldemEnumStage
           
 
Constructor Summary
TexasHoldemStage()
           
TexasHoldemStage(TexasHoldemStage.TexasHoldemEnumStage stage)
           
 
Method Summary
 int correspondingCase()
          Integer for which case to run in the Switch in PokerGame method updateStage(int Stage)
 int index()
          Function for transforming the stage into an integer for messages
 Stage indexToStage(int index)
          Returns the Stage that this integer represents this is the inverse of index()
static boolean isFlop(int stage)
           
static boolean isPreFlop(int stage)
           
static boolean isRiver(int stage)
           
static boolean isTurn(int stage)
           
 Stage lessThanTwoPlayers()
          Stage that should be run when there are one of less players still active Probably should correspond to case PokerGame.LESS_THAN_TWO_PLAYERS
 Stage next()
          Returns the stage following the current stage
 int param()
          Parameter concerning this stage, for stages with cards being dealt, the number of cards to deal
 Stage start()
          Stage that should be run first
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TexasHoldemStage

public TexasHoldemStage(TexasHoldemStage.TexasHoldemEnumStage stage)

TexasHoldemStage

public TexasHoldemStage()
Method Detail

lessThanTwoPlayers

public Stage lessThanTwoPlayers()
Description copied from interface: Stage
Stage that should be run when there are one of less players still active Probably should correspond to case PokerGame.LESS_THAN_TWO_PLAYERS

Specified by:
lessThanTwoPlayers in interface Stage
Returns:
Stage

correspondingCase

public int correspondingCase()
Description copied from interface: Stage
Integer for which case to run in the Switch in PokerGame method updateStage(int Stage)

Specified by:
correspondingCase in interface Stage
Returns:
int

index

public int index()
Description copied from interface: Stage
Function for transforming the stage into an integer for messages

Specified by:
index in interface Stage
Returns:
integer unique to the current stage

next

public Stage next()
Description copied from interface: Stage
Returns the stage following the current stage

Specified by:
next in interface Stage
Returns:
Stage

param

public int param()
Description copied from interface: Stage
Parameter concerning this stage, for stages with cards being dealt, the number of cards to deal

Specified by:
param in interface Stage
Returns:
integer

start

public Stage start()
Description copied from interface: Stage
Stage that should be run first

Specified by:
start in interface Stage
Returns:
the Stage

isFlop

public static boolean isFlop(int stage)

isPreFlop

public static boolean isPreFlop(int stage)

isRiver

public static boolean isRiver(int stage)

isTurn

public static boolean isTurn(int stage)

indexToStage

public Stage indexToStage(int index)
Description copied from interface: Stage
Returns the Stage that this integer represents this is the inverse of index()

Specified by:
indexToStage in interface Stage
Returns:
the Stage