コード例 #1
0
        public void initialize(String fileLocation)
        {
            BalanceAtBats = new List <Dictionary <int, int> >();

            // Load Stored data from database file
            StoredLineups = LineupPersistence.loadDatabase();

            TeamReportFile = new SOMTeamReportFile(fileLocation, StoredLineups, new Config());
            TeamReportFile.parse();

            CompleteListOfTeams = TeamReportFile.getTeams();

            TeamLineupData = TeamInformation.loadDatabase();
        }
コード例 #2
0
        public static IUsageCalculator getCalculator(CalculatorType type, SOMTeamReportFile teamReportFile, Team targetTeam)
        {
            if (type == CalculatorType.SP_BASIC)
            {
                return(new SPOnly_Straight_Calculator(teamReportFile, targetTeam));
            }
            else if (type == CalculatorType.SP_SCHEDULE)
            {
                return(new SPOnly_ScheduleWeighted_Calculator(teamReportFile, targetTeam));
            }
            else if (type == CalculatorType.ALL_PITCHERS_AND_SCHEDULE)
            {
                return(new AllPitchers_ScheduleWeighted_Calculator(teamReportFile, targetTeam));
            }

            throw new Exception("Unimplemented Calculator Type Requested");
        }
コード例 #3
0
 public SPOnly_Straight_Calculator(SOMTeamReportFile teamReportFile, Team targetTeam)
 {
     this.teamReportFile = teamReportFile;
     this.targetTeam     = targetTeam;
 }
コード例 #4
0
 public SPOnly_ScheduleWeighted_Calculator(SOMTeamReportFile teamReportFile, Team targetTeam)
 {
     this.teamReportFile = teamReportFile;
     this.targetTeam     = targetTeam;
 }