Example #1
0
        private void UpdateCyclists()
        {
            _cyclists = _cyclistService.UpdateCyclistsEndOfSeason(PlayerTeamId()).Where(c => c.SelectedForRace).ToList();

            foreach (var message in _cyclistService.GetAllMessages())
            {
                AddMessage(message);
            }
        }
Example #2
0
        private void AddYoungCyclists()
        {
            var teams    = _teamService.GetTeams();
            var cyclists = _cyclistService.GetCyclists().Where(c => c.TeamId >= 0).ToList();

            foreach (var team in teams)
            {
                if (team.Id == Configuration.UserTeamId)
                {
                    continue;
                }

                while (cyclists.Where(c => c.TeamId == team.Id).Count() < Configuration.NumberOfCyclistsInTeam)
                {
                    var newCyclist = _cyclistService.CreateYoungCyclist(team.Id);
                    cyclists.Add(newCyclist);
                }
            }

            foreach (var message in _cyclistService.GetAllMessages())
            {
                AddMessage(message);
            }
        }