Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## game
Class DoylesPlayer

    java.lang.Object
      game.Player
          game.DoylesPlayer

All Implemented Interfaces:
  java.lang.Comparable<Player>

    public class DoylesPlayer

extends Player

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.

Author:
  Witthold/Korol

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

### gainDelta

    private int gainDelta

  storage of won/lost money if it is doyles game

Constructor Detail

### DoylesPlayer

    public DoylesPlayer(java.lang.String name,
                        int money)

Parameters:
  `name` - Name of the player
  `money` - Initial amount of cash

Method Detail

### applyDelta

    public void applyDelta(int delta)

  Adds the given delta to the total amount of gained/lost money during the competition

  Parameters:
    `delta` - The new gain/loss

### getDelta

    public int getDelta()

  Returns:
    The amount of gain/loss during the competition

### reset

    public void reset()

  Description copied from class: `Player`
  Resets the player for a new hand.

  Overrides:
    `reset` in class `Player`

### compareTo

    public int compareTo(Player player)

  Description copied from class: `Player`
  Compares the player to another by the profit of the players.

  Specified by:
    `compareTo` in interface `java.lang.Comparable<Player>`
  Overrides:
    `compareTo` in class `Player`

### printPlayerData

    public void printPlayerData()

  Description copied from class: `Player`
  Prints the player's data to the console.

  Overrides:
    `printPlayerData` in class `Player`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD