Example #1
0
        public void Iterate()
        {
            _player1.Throw();
            _player2.Throw();

            Player winner = Winner(_player1, _player2);

            if (winner == null)
            {
                Console.WriteLine($"Draw with {_player1.Sign}.");
            }
            else
            {
                Player loser = winner == _player1 ? _player2 : _player1;

                ++winner.Score;

                Console.WriteLine($"{winner.Name} beats {loser.Name} with {winner.Sign} vs {loser.Sign}.");
            }

            Console.WriteLine($"{_player1.Name}: {_player1.Score}, {_player2.Name}: {_player2.Score}.");
            Console.WriteLine();
        }