double VictoryProbability(Elo opponent) { return 1.0 / (1.0 + Math.Pow(10, (opponent.Rating - rating) / 400.0)); }
internal void Victory(Elo opponent) { int eloDiff = ComputeEloDiff(1, opponent); rating += eloDiff; opponent.Rating -= eloDiff; }
private int ComputeEloDiff(double matchResult, Elo opponent) { return Convert.ToInt32(K * (matchResult - VictoryProbability(opponent))); }
internal void Null(Elo opponent) { int eloDiff = ComputeEloDiff(0.5, opponent); rating += eloDiff; opponent.Rating -= eloDiff; }
internal void Defeat(Elo opponent) { int eloDiff = ComputeEloDiff(0, opponent); rating += eloDiff; opponent.Rating -= eloDiff; }
public Player(string name) : base(name) { MatchsIds = new ObservableCollection<MatchID>(); Elo = new Elo(); }
public Player() { Elo = new Elo(); }
public PlayerRank(string name) { Elo = new Elo(); }