public void AnalyzeHands(BlackjackGame game) { decimal betAmount = 0M; foreach (var player in game.Players) { betAmount = game.GetBetAmount(player.Hand); if (betAmount > 0) { player.Bettor.BetAmount = betAmount; player.Bettor.Bet(); } } game.State = BlackjackGame.BetsPlacedState; }
public void DealRound(BlackjackGame game) { throw new NotImplementedException(); }
public void BeginPlay(BlackjackGame game) { throw new NotImplementedException(); }
public void Ante(BlackjackGame game) { throw new NotImplementedException(); }
public void NoMoreRounds(BlackjackGame game) { throw new NotImplementedException(); }
public void BeginGame(BlackjackGame game) { game.Initialize(); game.State = BlackjackGame.ReadyToPlayState; }
public void DealRound(BlackjackGame game) { game.DealToPlayers(); game.State = BlackjackGame.CardsDealtState; }
public void NoMoreRounds(BlackjackGame game) { game.DetermineWinner(); game.State = BlackjackGame.GameFinishedState; }
public void Ante(BlackjackGame game) { game.Players.Select(p => p.Bettor.BetAmount = game.AnteAmount).ToArray(); // set the amount to bet for all players to the ante amount game.BetAllPlayers(); game.State = BlackjackGame.AntePlacedState; }
public void BeginPlay(BlackjackGame game) { game.ShuffleCards(); game.State = BlackjackGame.CardsShuffledState; }
public void RequestCards(BlackjackGame game) { throw new NotImplementedException(); }