|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.asdf.plugins.pokergames.PlayerStates
public class PlayerStates
Efficient bit scrabble implementation for a Player state. Mostly checking n:th bit from state variable. No comments necessary for methods.
Constructor Summary | |
---|---|
PlayerStates()
|
Method Summary | |
---|---|
static int |
activated(int state)
Set the state to reflect that the player is in game, and active and not folded, nor sitting out |
static int |
committed(int state)
Set the state to reflect that the player has committed |
static int |
folded(int state)
Set the state to reflect that the player has folded, and is not active |
static int |
inGame(int state)
Set the state to reflect that the player is in game |
static boolean |
isActive(int state)
Checks if the player's state says he is active. |
static boolean |
isCommitted(int state)
Checks if the player's state says he has committed funds. |
static boolean |
isFolded(int state)
Checks if the player's state says he is folded. |
static boolean |
isInGame(int state)
Checks if the player's state says he is in game. |
static boolean |
isSittingOut(int state)
Checks if the player's state says he is sitting out. |
static void |
main(java.lang.String[] args)
ugly tests. |
static int |
sitIn(int state)
Set the state to reflect that the player is in game |
static int |
sitOut(int state)
Set the state to reflect that the player is sitting out |
static int |
unCommitted(int state)
Set the state to reflect that the player not committed |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PlayerStates()
Method Detail |
---|
public static boolean isInGame(int state)
state
- Integer representation of a player's state.
public static int inGame(int state)
state
- Integer representation of a player's state.
public static boolean isActive(int state)
state
- Integer representation of a player's state.
public static boolean isFolded(int state)
state
- Integer representation of a player's state.
public static int folded(int state)
state
- Integer representation of a player's state.
public static int activated(int state)
state
- Integer representation of a player's state.
public static boolean isCommitted(int state)
state
- Integer representation of a player's state.
public static int committed(int state)
state
- Integer representation of a player's state.
public static int unCommitted(int state)
state
- Integer representation of a player's state.
public static boolean isSittingOut(int state)
state
- Integer representation of a player's state.
public static int sitOut(int state)
state
- Integer representation of a player's state.
public static int sitIn(int state)
state
- Integer representation of a player's state.
public static void main(java.lang.String[] args)
args
- ...
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |