|
||||||||||
| 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 cash| Method Detail |
|---|
public void applyDelta(int delta)
delta - The new gain/losspublic int getDelta()
public void reset()
Player
reset in class Playerpublic int compareTo(Player player)
Player
compareTo in interface java.lang.Comparable<Player>compareTo in class Playerpublic void printPlayerData()
Player
printPlayerData in class Player
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||