|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgame.Action
public class Action
Represents an action of a player. blind posting: 'b' folding: 'f' checking: 'c' + amount of change == 0 calling: 'c' + amount of change != 0 raising: 'r'
Field Summary | |
---|---|
private char |
action
'b' for blind posting; 'f' for folding; 'c' for checking/calling; 'r' for raising; |
private boolean |
allIn
If the action is an all-in |
private int |
change
Amount of money change by this action |
private int |
player
Index of player who applied this action |
private int |
potBefore
Amount in the pot before the action takes effect |
private long |
timestamp
Time stamp of creation of the action |
Constructor Summary | |
---|---|
Action(char action,
int change)
Generates a new action. |
|
Action(int potBefore,
int player,
char action,
int change)
Generates a new action. |
Method Summary | |
---|---|
char |
getAction()
|
int |
getChange()
|
int |
getPlayer()
|
int |
getPotBefore()
|
long |
getTimestamp()
|
boolean |
isAllIn()
|
boolean |
isBlind()
|
boolean |
isCall()
|
boolean |
isCheck()
|
boolean |
isFold()
|
boolean |
isRaise()
|
void |
setAllIn()
Marks the action as an all-in action |
int |
toInt()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private long timestamp
private char action
private int change
private int player
private int potBefore
private boolean allIn
Constructor Detail |
---|
public Action(int potBefore, int player, char action, int change)
potBefore
- Amount in the pot before the action takes effectplayer
- Index of player who applied this actionaction
- Type of action as char: 'b' for blind posting; 'f' for folding; 'c' for checking/calling; 'r' for raising;change
- Amount of money change by this actionpublic Action(char action, int change)
action
- Type of action as char: 'b' for blind posting; 'f' for folding; 'c' for checking/calling; 'r' for raising;change
- Amount of money change by this actionMethod Detail |
---|
public boolean isBlind()
public boolean isCheck()
public boolean isCall()
public boolean isRaise()
public boolean isFold()
public char getAction()
public int getChange()
public long getTimestamp()
public int getPotBefore()
public int getPlayer()
public void setAllIn()
public boolean isAllIn()
public int toInt()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |