Beispiel #1
0
        private static void EvaluateWinnerScore(int[][] attempt, int expectedScore)
        {
            int playerOneThrow = 0, playerTwoThrow = 0;

            for (int i = 0; i < attempt.Length; i += 1)
            {
                Console.WriteLine($"Index: {i}");

                playerOneThrow = attempt[i][0];
                playerTwoThrow = attempt[i][1];

                var testValue = RockPaperScissorsGame.GetWinner(playerOneThrow, playerTwoThrow);
                Console.WriteLine($"RPS Score: {testValue}");

                Assert.True(testValue == expectedScore, $"Score was {testValue} the expected value is {expectedScore}.");
            }
        }