public void Combine(Entry entry, GameResult result) { Count += entry.Count; TotalEloDiff += entry.EloDiff.Or(0); switch (result) { case GameResult.WhiteWin: WinCount += entry.Count; break; case GameResult.Draw: DrawCount += entry.Count; break; case GameResult.BlackWin: LossCount += entry.Count; break; } if (FirstGame.Count() == 0) { FirstGame = entry.FirstGame; } else if (entry.FirstGame.Count() != 0 && entry.FirstGame.First().GameId < FirstGame.First().GameId) { FirstGame = entry.FirstGame; } }
public void Combine(AggregatedEntry entry) { if (entry == null) { return; } Count += entry.Count; WinCount += entry.WinCount; DrawCount += entry.DrawCount; LossCount += entry.LossCount; TotalEloDiff += entry.TotalEloDiff; if (FirstGame.Count() == 0) { FirstGame = entry.FirstGame; } else if (entry.FirstGame.Count() != 0 && entry.FirstGame.First().IsBefore(FirstGame.First())) { FirstGame = entry.FirstGame; } }