예제 #1
0
        private void CompareSelection()
        {
            int scoreComparison;

            scoreComparison = (5 + playerOne.playerSelection - playerTwo.playerSelection) % 5;
            if (scoreComparison == 0)
            {
                Console.WriteLine("Tie Game");
            }
            else if (scoreComparison % 2 == 0)
            {
                Console.WriteLine($"{playerTwo.playerName} wins the round!");
                playerTwo.AddScore();
            }
            else
            {
                Console.WriteLine($"{playerOne.playerName} wins the round!");
                playerOne.AddScore();
            }
        }