Пример #1
0
        public override void RenderAsHtml()
        {
            foreach (var rpt in Configs)
            {
#if DEBUG
                Announce($"Suggesting a lineup for {rpt.OwnerCode} in league {rpt.League} team {rpt.TeamCode} - {rpt.Season}:{rpt.Week}");
#endif
                LeagueId          = rpt.League;
                League            = new FantasyLeague(rpt.League);
                TeamCode          = rpt.TeamCode;
                OwnerCode         = rpt.OwnerCode;
                Season            = rpt.Season;
                Week              = rpt.Week;
                Scorer            = rpt.Scorer;
                IncludeFreeAgents = rpt.IncludeFreeAgents;

                _usedPlayers = new List <NFLPlayer>();
                RankMaster   = new Hashtable();

                Render();

                _usedPlayers.Clear();
                _playerList.Clear();
            }
        }
Пример #2
0
        public SuggestedLineup(string leagueId, string ownerCode, string teamCode, string season, int week)
        {
#if DEBUG
            Utility.Announce(string.Format("Suggesting a lineup for {0} in league {1} team {2} - {3}:{4}",
                                           ownerCode, leagueId, teamCode, season, week));
#endif
            LeagueId  = leagueId;
            League    = new FantasyLeague(leagueId);
            TeamCode  = teamCode;
            OwnerCode = ownerCode;
            Season    = season;
            Week      = week;
            NflWeek   = new NFLWeek(Season, Week.ToString());
            if (LeagueId.Equals(Constants.K_LEAGUE_Yahoo) || LeagueId.Equals(Constants.K_LEAGUE_PerfectChallenge))
            {
                Scorer = new EspnScorer(NflWeek);
            }
            else
            {
                Scorer = new GS4Scorer(NflWeek);
            }

            _usedPlayers      = new List <NFLPlayer>();
            RankMaster        = new Hashtable();
            IncludeFreeAgents = false;
        }
Пример #3
0
 public ProjectedLineup(string leagueId, string teamCode, string season, int week)
 {
     LeagueId     = leagueId;
     League       = new FantasyLeague(leagueId);
     TeamCode     = teamCode;
     Season       = season;
     Week         = week;
     _usedPlayers = new List <NFLPlayer>();
 }
Пример #4
0
        public SuggestedLineup(string leagueId, string ownerCode, string teamCode, string season, int week)
        {
            #if DEBUG2
             Utility.Announce(string.Format("Suggesting a lineup for {0} in league {1} team {2} - {3}:{4}",
                                        ownerCode, leagueId, teamCode, season, week));
            #endif
             LeagueId = leagueId;
             League = new FantasyLeague(leagueId);
             TeamCode = teamCode;
             OwnerCode = ownerCode;
             Season = season;
             Week = week;
             NflWeek = new NFLWeek(Season, Week.ToString());
             if ( LeagueId.Equals( Constants.K_LEAGUE_Yahoo )
            || LeagueId.Equals( Constants.K_LEAGUE_Rants_n_Raves ) )
            Scorer = new EspnScorer(NflWeek);
             else
            Scorer = new GS4Scorer(NflWeek);

             _usedPlayers = new List<NFLPlayer>();
             RankMaster = new Hashtable();
             IncludeFreeAgents = false;
        }
Пример #5
0
        public SuggestedLineup(string leagueId, string ownerCode, string teamCode,
                               IKeepTheTime timekeeper) : base(timekeeper)
        {
#if DEBUG
            Announce($@"Suggesting a lineup for {
			 ownerCode
			 } in league {
			 leagueId
			 } team {
			 teamCode
			 } - {
			 timekeeper.Season}:{timekeeper.Week}"            );
#endif
            LeagueId  = leagueId;
            League    = new FantasyLeague(leagueId);
            TeamCode  = teamCode;
            OwnerCode = ownerCode;
            Season    = timekeeper.CurrentSeason();
            Week      = Int32.Parse(timekeeper.Week);
            NflWeek   = new NFLWeek(Season, Week.ToString());
            if (LeagueId.Equals(Constants.K_LEAGUE_Yahoo) ||
                LeagueId.Equals(Constants.K_LEAGUE_Rants_n_Raves))
            {
                Scorer = new EspnScorer(NflWeek);
            }
            else
            {
                Scorer = new GS4Scorer(NflWeek);
            }
#if DEBUG
            Scorer.AnnounceIt = true;
#endif
            _usedPlayers      = new List <NFLPlayer>();
            RankMaster        = new Hashtable();
            IncludeFreeAgents = false;
        }
Пример #6
0
        public override void RenderAsHtml()
        {
            foreach (var rpt in Configs)
             {
            #if DEBUG
            Utility.Announce(string.Format("Suggesting a lineup for {0} in league {1} team {2} - {3}:{4}",
                                           rpt.OwnerCode, rpt.League, rpt.TeamCode, rpt.Season, rpt.Week));
            #endif
            LeagueId = rpt.League;
            League = new FantasyLeague(rpt.League);
            TeamCode = rpt.TeamCode;
            OwnerCode = rpt.OwnerCode;
            Season = rpt.Season;
            Week = rpt.Week;
            Scorer = rpt.Scorer;
            IncludeFreeAgents = rpt.IncludeFreeAgents;

            _usedPlayers = new List<NFLPlayer>();
            RankMaster = new Hashtable();

            Render();

            _usedPlayers.Clear();
            _playerList.Clear();
             }
        }