Exemplo n.º 1
0
        public void TestGetWinProbability(int playerRating, int opponentRating, double expectedProbabilityToTwoDecimalPlaces)
        {
            var calculator        = new EloCalculator(32);
            var actualProbability = calculator.GetWinProbability(playerRating, opponentRating);
            var actualProbabilityToTwoDecimalPlaces = Math.Round(actualProbability, 2);

            Assert.AreEqual(expectedProbabilityToTwoDecimalPlaces, actualProbabilityToTwoDecimalPlaces);
        }