예제 #1
0
        public void TestUpdateRating(int playerRating, int opponentRating, Result result, int expectedNewPlayerRating)
        {
            var calculator      = new EloCalculator(32);
            var newRatingHolder = calculator.UpdateRating(new RatingHolder(0, playerRating), new RatingHolder(1, opponentRating), result);

            Assert.AreEqual(newRatingHolder.Rating, expectedNewPlayerRating);
        }