public Winninghand ReturnWinner(RegularPlayer player) { //returns winner: a regular player OR dealer: Winninghand winner = Rules.EvaluateWinner(player.Hand, dealer.Hand); return(winner); }
private bool ValidateBet(RegularPlayer player, int bet) { if (player.Balance < bet) { return(false); } else { return(true); } }
public bool BetIsValid(RegularPlayer player) { //TODO rules class should be the validator of bets int betToTry = player.MakeBet(); bool betIsValid = ValidateBet(player, betToTry); if (betIsValid) { player.Bet = betToTry; return(true); } else { return(false); } }
public void AddPlayer(RegularPlayer player) { players.Add(player); }
public void RemovePlayer(RegularPlayer player) { //AiDealer not removable with this method players.Remove(player); }
private void ClearBet(RegularPlayer player) { player.Bet = 0; }