예제 #1
0
 public CsgoCalculator(CsgoInfo info, string firstTeam, string secondTeam, int maps)
 {
     Teams = new List<CsgoTeam>(info.Teams);
     Matches = new List<CsgoMatch>(info.Matches);
     FirstTeamName = firstTeam;
     SecondTeamName = secondTeam;
     Maps = maps;
     Params = new TeamStatParams(DateTime.Now, DateTime.Now.AddMonths(-3),
         1.5f, 0.7f, 0.5f, 0.2f);
     TeamsStats = new Dictionary<int, TeamStat>();
     MapPull = new List<string>();
 }
예제 #2
0
        private void InitCsgoInfo()
        {
            using (BettyContextCsgo context = new BettyContextCsgo())
            {
                List<CsgoTeam> teams = context.csgo_team.AsEnumerable().ToList();
                List<CsgoPlayer> players = context.csgo_player.AsEnumerable().ToList();
                List<CsgoMatch> matches = context.csgo_match.AsEnumerable().ToList();
                List<CsgoBets> bets = context.csgo_bets.AsEnumerable().ToList();

                CsgoInfo = new CsgoInfo(teams, players, matches, bets);

                new CsgoLadder(CsgoInfo).CalculateTeams();

                CsgoInfo.Teams = context.csgo_team.AsEnumerable().ToList();
            }
        }