Exemplo n.º 1
0
        public Race GetMainRace()
        {
            var mostGamesRace = WinLosses?
                                .OrderByDescending(x => x.Games)
                                .FirstOrDefault();

            return(mostGamesRace != null ? mostGamesRace.Race : Race.RnD);
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
 public int GetWinsPerRace(Race race)
 {
     return(WinLosses.Single(w => w.Race == race).Wins);
 }