public virtual PlayoffSeries SetupSeries(Playoff playoff, PlayoffSeriesRule.Type seriesType, string name, int round, int startingDay, PlayoffTeam homeTeam, PlayoffTeam awayTeam, int seriesNumber, int[] homeGameProgression) { //if it is not setup, create it switch (seriesType) { case PlayoffSeriesRule.Type.BestOf: return(new BestOfSeries(playoff, name, round, startingDay, homeTeam, awayTeam, 0, 0, seriesNumber, new List <PlayoffGame>(), homeGameProgression)); case PlayoffSeriesRule.Type.TotalGoals: return(new TotalGoalsSeries(playoff, name, round, startingDay, homeTeam, awayTeam, 0, 0, seriesNumber, 0, new List <PlayoffGame>(), homeGameProgression)); default: throw new ApplicationException("Bad series type from Playoff Series rule: " + seriesType); } }
public TotalGoalsSeries(Playoff playoff, string name, int round, int startingDay, PlayoffTeam homeTeam, PlayoffTeam awayTeam, int homeScore, int awayScore, int minimumGames, int gamesPlayed, List <PlayoffGame> games, int[] homeGameProgression) : base(playoff, name, round, startingDay, homeTeam, awayTeam, games, homeGameProgression) { HomeScore = homeScore; AwayScore = awayScore; GamesPlayed = gamesPlayed; MinimumGames = minimumGames; }
public BestOfSeries(Playoff playoff, string name, int round, int startingDay, PlayoffTeam homeTeam, PlayoffTeam awayTeam, int homeWins, int awayWins, int requiredWins, List <PlayoffGame> games, int[] homeGameProgression) : base(playoff, name, round, startingDay, homeTeam, awayTeam, games, homeGameProgression) { HomeWins = homeWins; AwayWins = awayWins; RequiredWins = requiredWins; }