Class Player

java.lang.Object
com.shr4pnel.casino.base.Player
Direct Known Subclasses:
BlackjackPlayer

public abstract class Player extends Object
The base class for all players
Since:
0.1.0
See Also:
  • Field Details

    • hand

      protected List<Card> hand
    • playerControlled

      protected boolean playerControlled
    • chips

      protected Long chips
    • bet

      protected Long bet
  • Constructor Details

    • Player

      public Player(boolean playerControlled)
  • Method Details

    • getChips

      public Long getChips()
      Returns:
      Amount of chips the player has
    • setChips

      public void setChips(Long l)
    • incrementChips

      public void incrementChips(Long l)
      Add a number to the existing chip count
      Parameters:
      l - The amount to add, can be negative
    • getBet

      public Long getBet()
      Returns:
      The players current bet
    • incrementBet

      public void incrementBet(Long l)
      Parameters:
      l -
    • add

      public void add(Card card)
      Add a card to the players hand
      Parameters:
      card - The card to add
    • add

      public void add(List<Card> cards)
      Add several cards to the players hand
      Parameters:
      cards - A list of cards