示例#1
0
        public void TestEloDrawHigher()
        {
            int startRate = 1000;
            int otherRating = 600;
            int expectedRating = 987;
            double decision = 0.5;
            Player p = new Player("", startRate, 0, 0, 0, 1);

            p.CalcNewELO(otherRating, decision);

            Assert.AreEqual(expectedRating, p.Rating);
        }
示例#2
0
        public void TestEloLoseEven()
        {
            int startRate = 1000;
            int otherRating = 1000;
            int expectedRating = 984;
            double decision = 0;
            Player p = new Player("", startRate, 0, 0, 0, 1);

            p.CalcNewELO(otherRating, decision);

            Assert.AreEqual(expectedRating, p.Rating);
        }
示例#3
0
        public void TestEloModWin()
        {
            Player p = new Player("", 1000, 0, 0, 0, 1);
            double decision = 1.0;

            p.CalcNewELO(1000, decision);

            TestWLD(p, 1, 0, 0);
        }
示例#4
0
        public void TestEloWinLower()
        {
            int startRate = 600;
            int otherRating = 1000;
            int expectedRating = 629;
            double decision = 1.0;
            Player p = new Player("", startRate, 0, 0, 0, 1);

            p.CalcNewELO(otherRating, decision);

            Assert.AreEqual(expectedRating, p.Rating);
        }
示例#5
0
        public void TestEloModDraw()
        {
            Player p = new Player("", 1000, 0, 0, 0, 1);
            double decision = 0.5;

            p.CalcNewELO(1000, decision);

            TestWLD(p, 0, 0, 1);
        }