Esempio n. 1
0
        public void TestCalculateElo_EqualTeam_BrutalWin_SmallWeight()
        {
            var match = new Match()
            {
                Winner = new Team()
                {
                    Players = new List <Player>()
                    {
                        new Player()
                        {
                            Name = "A",
                            Elo  = 1234
                        },

                        new Player()
                        {
                            Name = "B",
                            Elo  = 1120
                        },

                        new Player()
                        {
                            Name = "C",
                            Elo  = 980
                        },

                        new Player()
                        {
                            Name = "C",
                            Elo  = 970
                        },
                    },
                    TeamElo = (1234 + 1120 + 980 + 970) / 4
                },
                Looser = new Team()
                {
                    Players = new List <Player>()
                    {
                        new Player()
                        {
                            Name = "A",
                            Elo  = 1234
                        },

                        new Player()
                        {
                            Name = "B",
                            Elo  = 1120
                        },

                        new Player()
                        {
                            Name = "C",
                            Elo  = 980
                        },

                        new Player()
                        {
                            Name = "C",
                            Elo  = 970
                        },
                    },
                    TeamElo = (1234 + 1120 + 980 + 970) / 4
                },
                Date         = DateTime.Now,
                WinnerAmount = 12,
                LooserAmount = 5,
                Weight       = 10
            };

            var eloCalultor   = new FifaEloCounter();
            var fifaEloResult = eloCalultor.CalculateFifaElo(match);
        }
Esempio n. 2
0
        public void TestCalculateElo_NotEqualTeam_WorseSetAsWinner_Tie_BigWieght()
        {
            var match = new Match()
            {
                Winner = new Team()
                {
                    Players = new List <Player>()
                    {
                        new Player()
                        {
                            Name = "A",
                            Elo  = 1234
                        },

                        new Player()
                        {
                            Name = "B",
                            Elo  = 1120
                        },

                        new Player()
                        {
                            Name = "C",
                            Elo  = 980
                        },

                        new Player()
                        {
                            Name = "C",
                            Elo  = 970
                        },
                    },
                    TeamElo = 1011
                },
                Looser = new Team()
                {
                    Players = new List <Player>()
                    {
                        new Player()
                        {
                            Name = "A",
                            Elo  = 1234
                        },

                        new Player()
                        {
                            Name = "B",
                            Elo  = 1120
                        },

                        new Player()
                        {
                            Name = "C",
                            Elo  = 980
                        },

                        new Player()
                        {
                            Name = "C",
                            Elo  = 970
                        },
                    },
                    TeamElo = 1052
                },
                Date         = DateTime.Now,
                WinnerAmount = 7,
                LooserAmount = 7,
                Weight       = 30
            };

            var eloCalultor   = new FifaEloCounter();
            var fifaEloResult = eloCalultor.CalculateFifaElo(match);
        }