Ejemplo n.º 1
0
        public static void Play()
        {
            var player1Move = Player1.Play();
            var player2Move = Player2.Play();

            if (player1Move.Defeats(player2Move))
            {
                Console.WriteLine($"{Player1.Name} ({player1Move}) defeats {Player2.Name} ({player2Move}) !");

                Player1.IncrementWinCount();
            }
            else if (player2Move.Defeats(player1Move))
            {
                Console.WriteLine($"{Player2.Name} ({player2Move})  defeats {Player1.Name} ({player1Move}) !");

                Player2.IncrementWinCount();
            }
            else
            {
                Console.WriteLine("It's a Draw!");
            }
        }