Exemplo n.º 1
0
        public static void HoldHit()
        {
            Console.WriteLine($"Your hand Gives you: {Poker.PlayerScore} Points would you like to hit? or hold");
            string hitOrHold = Console.ReadLine().ToLower();

            if (hitOrHold == "hold")
            {
                Console.WriteLine($"Winner: {Poker.CompareScore(Poker.PlayerScore, Poker.DealerScore)}");
                Main();
            }
            else
            {
                Poker.PlayerHand.Add(Poker.Hit());
                Poker.DevShowDeck(Poker.PlayerHand);
                Poker.PlayerScore = Poker.ClacScore(Poker.PlayerHand);
                string state = Poker.CheckState(Poker.PlayerScore);
                if (state == "Black Jack")
                {
                    Console.WriteLine($"{state}! You win!");
                    Main();
                }
                else if (state == "Bust")
                {
                    Console.WriteLine($"Your hand Gives you: {Poker.PlayerScore}! You Busted!");
                    Main();
                }
                else
                {
                    Console.WriteLine($"Your hand Gives you: {Poker.PlayerScore} Points would you like to hit? or hold");
                    HoldHit();
                }
            }
        }