public Race GetMainRace() { var mostGamesRace = WinLosses? .OrderByDescending(x => x.Games) .FirstOrDefault(); return(mostGamesRace != null ? mostGamesRace.Race : Race.RnD); }
public void RecordWin(Race race, int season, bool won) { if (!ParticipatedInSeasons.Select(s => s.Id).Contains(season)) { ParticipatedInSeasons.Insert(0, new Season(season)); } if (season != 0) { WinLosses.Single(w => w.Race == race).RecordWin(won); } }
public int GetWinsPerRace(Race race) { return(WinLosses.Single(w => w.Race == race).Wins); }