uk.co.triplesix.craps
Class Player

java.lang.Object
  extended by uk.co.triplesix.craps.Player

public class Player
extends java.lang.Object

This class contains all the information pertaining to the player of the Craps game

Author:
Karl Smith

Method Summary
 void addFunds(double amount)
          Add an amount on to the player's total cash
 double getFunds()
          Get the player's current cash stores
 int getStake()
          Find out how much the player bet
 boolean placeBet(int betAmount)
          Place a bet for the specified amount
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

placeBet

public boolean placeBet(int betAmount)
Place a bet for the specified amount

Parameters:
betAmount - The amount to bet.
Returns:
True if the player has funds to cover the bet. False if not.

getFunds

public double getFunds()
Get the player's current cash stores

Returns:
The amount of money currently held by the player

addFunds

public void addFunds(double amount)
Add an amount on to the player's total cash

Parameters:
amount - The amount of money to add

getStake

public int getStake()
Find out how much the player bet

Returns:
The player's current stake.