public HtmlPageParser(IWaFFLDataSource dataSource, ITeamResolver teamResolver) { _dataSource = dataSource; _seasonParser = new TableDataParser("Week 1"); _postseasonParser = new TableDataParser("Wild Card Week", "Wild Card", "Semi-Finals"); _extractor = new GameExtractor(teamResolver); _playoffExtractor = new PlayoffGameExtractor(teamResolver); }
public static string GetBestTeamPlayerDivString(this Team t, ITeamResolver splatTagController) { var playersForTeam = splatTagController.GetPlayersForTeam(t); Division highestDiv = t.CurrentDiv; Team? highestDivTeam = null; Player? bestPlayer = null; foreach (var(player, mostRecent) in playersForTeam) { if (mostRecent && player.TeamInformation.Count > 1) { foreach (Team playerTeam in player.TeamInformation.GetAllTeamsUnordered().Select(id => splatTagController.GetTeamById(id))) { if (playerTeam.CurrentDiv < highestDiv) { highestDiv = playerTeam.CurrentDiv; bestPlayer = player; highestDivTeam = playerTeam; } } } } if (bestPlayer == null || highestDiv == Division.Unknown) { // Don't show anything it's pointless. return(""); } else if (highestDiv.Value == t.CurrentDiv.Value) { return("No higher div players."); } else { Debug.Assert(bestPlayer != null && highestDivTeam != null); return($"Highest div'd player is {bestPlayer.Name} at {highestDiv} playing for {highestDivTeam.Name}."); } }
public PlayoffGameExtractor(ITeamResolver teamResolver) { _teamResolver = teamResolver; }
public GameExtractor(ITeamResolver resolver) { teamResolver = resolver; }
public Ranker(IDriveResolver driveResolver, IGameResolver gameResolver, ITeamResolver teamResolver) { this.driveResolver = driveResolver; this.gameResolver = gameResolver; this.teamResolver = teamResolver; }