/** 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 initial) { balance = initial; } public boolean isBroke() { if (balance <= 0) return true; else return false; } public boolean isValidBet(int bet) { if (bet <= balance) return true; else return false; } public void changeBalance(int howMuch) { balance += howMuch; } public int getBalance() { return balance; } }