예제 #1
0
 public Player(string name, Random rnd, List <PlayingCards> startingCards)
 {
     Money  = 1000;
     Name   = name;
     Hand   = startingCards;
     Points = manage.AddPoints(startingCards);
 }
예제 #2
0
        public PartialViewResult NewRound()
        {
            var currentGame = cacheManage.CachedGame();

            var fourCards = cardManage.GetStartingCards(rnd, currentGame.Deck.deck);

            currentGame.Player.Hand = new List <PlayingCards>();
            currentGame.Dealer.Hand = new List <PlayingCards>();

            currentGame.Player.Hand   = fourCards.GetRange(0, 2);
            currentGame.Player.Points = manage.AddPoints(currentGame.Player.Hand);

            currentGame.Dealer.Hand   = fourCards.GetRange(2, 2);
            currentGame.Dealer.Points = manage.AddPoints(currentGame.Dealer.Hand);
            currentGame.Bet           = 0;
            currentGame.startOfGame   = true;
            currentGame.Result        = null;

            RoundOver(currentGame, true, false);

            return(PartialView("Blackjack", currentGame));
        }
예제 #3
0
 public Dealer(Random rnd, List <PlayingCards> startingCards)
 {
     startingCards[1].Show = false;
     Hand   = startingCards;
     Points = manage.AddPoints(startingCards);
 }