Exemplo n.º 1
0
 public void CalculateElo()
 {
     var(team1Elo, team2Elo) = Elo.CalculateElo(Player1.CurrentElo, Player2.CurrentElo, HomeTeamScore, AwayTeamScore);
     SetEloChange(Player1.CurrentElo, team1Elo);
     Player1.CurrentElo = team1Elo;
     Player2.CurrentElo = team2Elo;
 }
Exemplo n.º 2
0
 public void CalculateElo()
 {
     var(team1Elo, team2Elo) = Elo.CalculateElo(Team1.CurrentElo, Team2.CurrentElo, HomeTeamScore, AwayTeamScore);
     SetEloChange(Team1.CurrentElo, team1Elo);
     Team1.CurrentElo = team1Elo;
     Team2.CurrentElo = team2Elo;
 }
Exemplo n.º 3
0
        private void UpdatePlayer(SoloTeamPlayer soloTeamPlayer, double homeTeamElo, double awayTeamElo)
        {
            soloTeamPlayer.Match = this;
            var newElo = soloTeamPlayer.Team == TeamSide.Home ?
                         Elo.CalculateElo(homeTeamElo, awayTeamElo, HomeTeamScore, AwayTeamScore, soloTeamPlayer.Player.CurrentElo) :
                         Elo.CalculateElo(awayTeamElo, homeTeamElo, AwayTeamScore, HomeTeamScore, soloTeamPlayer.Player.CurrentElo);

            SetEloChange(soloTeamPlayer.Player.CurrentElo, newElo);
            soloTeamPlayer.Player.CurrentElo = newElo;
        }