|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgame.Player
game.DoylesPlayer
public class DoylesPlayer
A Player who is extended from Player for playing "Doyle's game". The amount of gain/lost over the hands is stored as gain delta, because the cash is reseted each hand to the initial cash.
Field Summary | |
---|---|
private int |
gainDelta
storage of won/lost money if it is doyles game |
Fields inherited from class game.Player |
---|
cashCurrent, cashInit |
Constructor Summary | |
---|---|
DoylesPlayer(java.lang.String name,
int money)
|
Method Summary | |
---|---|
void |
applyDelta(int delta)
Adds the given delta to the total amount of gained/lost money during the competition |
int |
compareTo(Player player)
Compares the player to another by the profit of the players. |
int |
getDelta()
|
void |
printPlayerData()
Prints the player's data to the console. |
void |
reset()
Resets the player for a new hand. |
Methods inherited from class game.Player |
---|
addBet, addCash, applyAction, fold, getCashAtStartOfHand, getCurrentBet, getCurrentCash, getCurrentPosition, getHoleCards, getInitCash, getInitPosition, getName, isActive, isAllIn, isFolded, setCashAtStartOfHand, setCurrentPosition, setHoleCards, setInitPosition |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int gainDelta
Constructor Detail |
---|
public DoylesPlayer(java.lang.String name, int money)
name
- Name of the playermoney
- Initial amount of cashMethod Detail |
---|
public void applyDelta(int delta)
delta
- The new gain/losspublic int getDelta()
public void reset()
Player
reset
in class Player
public int compareTo(Player player)
Player
compareTo
in interface java.lang.Comparable<Player>
compareTo
in class Player
public void printPlayerData()
Player
printPlayerData
in class Player
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |