Beispiel #1
0
        public int[] PlayerFirst(int playingOrder)
        {
            GamePlayQuestion();
            int[] output = new int[2];
            while (true)
            {
                int ans = Int32.Parse(Console.ReadLine());
                if (ans <= hand.PlayerHandSize() - 1 && ans > -1)
                {
                    int[] playerCard = Player(ans);
                    int[] aiCard     = AI();
                    output[1] = Winner(playerCard[0], aiCard[0], playerCard[1], aiCard[1], playingOrder);

                    if (hand.PlayerHandSize() == 0)
                    {
                        output[0] = 0;  // End game (no more cards)
                        return(output);
                    }
                    output[0] = 1;  // Continue game
                    return(output);
                }
                else
                {
                    Console.WriteLine($"Hey dumdum! You have to choose between (0-{(hand.PlayerHandSize() - 1).ToString()})");
                }
            }
        }