/** This is a general player class that keeps track of how much money a player * has. We start with some initial balance, make changes based on betting * (wins/losses) and check to see if the player can keep going. */ public class Player { private int balance; public Player (int initialBalance) { balance = initialBalance; } public boolean isBroke() { return (balance <= 0); } public boolean isValidBet (int bet) { return (bet <= balance); } public void changeBalance(int howMuch) { balance += howMuch; } public int getBalance() { return balance; } }