private static List <IPlayer> GetSinglePlayerListWithSingleCompletedHand(decimal initialPlayerTotalCash, decimal bet, HandOutcome handOutcome)
        {
            var playerHand = new PlayerHand {
                Bet = bet, Outcome = handOutcome
            };
            var mockPlayerStrategy = new Mock <IPlayerStrategy>();
            var player             = new Player(initialPlayerTotalCash, mockPlayerStrategy.Object);

            player.CurrentHands.Add(playerHand);
            return(new List <IPlayer> {
                player
            });
        }
Ejemplo n.º 2
0
 public HighCardTestHand(List <CardName> playerHand, List <CardName> opponentHand, HandOutcome handOutcome)
 {
     PlayerHand   = playerHand;
     OpponentHand = opponentHand;
     HandOutcome  = handOutcome;
 }
Ejemplo n.º 3
0
 public static double DetermineIncome(HandOutcome handOutcome, double handCashBalance)
 {
     switch (handOutcome)
     {
         case HandOutcome.PlayerBlackjack: return handCashBalance + handCashBalance * 1.5;
         case HandOutcome.PlayerWins: return handCashBalance + handCashBalance;
         case HandOutcome.DealerWins: return 0;
         case HandOutcome.Push: return handCashBalance;
     }
     return 0;
 }