Example #1
0
        public string PlayerWikiPiece(
            NFLPlayer player,
            NFLGame game,
            YahooCalculator calculator)
        {
            var nextOppTeam = player.NextOpponentTeam(game);
            var plusMatchup = PlusMatchup(player, nextOppTeam, player.CurrTeam);
            var matchupLink = nextOppTeam.DefensiveUnitMatchUp(
                catCode: player.PlayerCat,
                matchUp: plusMatchup,
                bLinks: false);
            var owners = player.LoadAllOwners();

            calculator.Calculate(player, game);
            var namePart = NoWiki($"{player.PlayerNameTo(11)}");

            namePart = UpperCaseMyPlayers(player, namePart);
            namePart = BoldFreeAgents(player, namePart);
            namePart = ItaliseNewPlayers(player, game, namePart);
            var playerPiece = string.Empty;

            if (player.PlayerCat.Equals(Constants.K_KICKER_CAT))
            {
                playerPiece = $@" {namePart,-11}  {
					owners
					}  ({PlayerPointsOut(player)}{DomeBit(game, player).Trim()})"                    ;
            }
            else
            {
                playerPiece = $@"{
					ReturnerBit(player)
					}{namePart,-11}{
					ShortYardageBit(player)
					} {owners}  {matchupLink}  ({PlayerPointsOut(player)}{
					DomeBit(game, player)
					})"                    ;
            }

            return(playerPiece);
        }
Example #2
0
        public string PlayerPiece(
            NFLPlayer p,
            NFLGame g,
            YahooCalculator c)
        {
            var nextOppTeam = p.NextOpponentTeam(g);
            var plusMatchup = PlusMatchup(p, nextOppTeam, p.CurrTeam);
            var matchupLink = nextOppTeam.DefensiveUnitMatchUp(
                p.PlayerCat,
                plusMatchup);
            var owners = p.LoadAllOwners();

            c.Calculate(p, g);
            var namePart = string.Format("<a href='..\\Roles\\{0}-Roles-{1:0#}.htm'>{2}</a>",
                                         p.TeamCode, Week - 1, p.PlayerNameTo(11));

            if (p.PlayerCat.Equals(Constants.K_KICKER_CAT))
            {
                AddPickup(p, g);
                return(string.Format(" {0,-11}  {1}  {2,2:#0}{3} {4}",
                                     namePart,
                                     owners,
                                     p.Points,
                                     DomeBit(g, p),
                                     ActualOutput(g, p)
                                     ));
            }
            AddPickup(p, g);
            return(string.Format("{6}{0,-11}{7} {3}  {1}  {2,2:#0}{5} {4}",
                                 namePart,
                                 matchupLink, //  defensiveRating,
                                 p.Points,
                                 owners,
                                 ActualOutput(g, p),
                                 DomeBit(g, p),
                                 ReturnerBit(p),
                                 ShortYardageBit(p)
                                 ));
        }
Example #3
0
 public string PlayerPiece( NFLPlayer p, NFLGame g, YahooCalculator c )
 {
     var nextOppTeam = p.NextOpponentTeam( g );
     var defensiveRating = nextOppTeam.DefensiveUnit(p.PlayerCat);
     var owners = p.LoadAllOwners();
      c.Calculate( p, g );
     var namePart = string.Format( "<a href='..\\Roles\\{0}-Roles-{1:0#}.htm'>{2}</a>",
     p.TeamCode, Week - 1, p.PlayerNameTo( 11 ) );
      return string.Format( "{0,-11} {3}  {1}  {2,2:#0}{5} {4} ",
     namePart, defensiveRating, p.Points, owners, ActualOutput(g,p),
     DomeBit(g,p));
 }
Example #4
0
        public string PlayerPiece(
            NFLPlayer player,
            NFLGame game,
            YahooCalculator calculator,
            bool bLinks = true,
            List <NFLPlayer> runners = null)
        {
            var nextOppTeam = player.NextOpponentTeam(
                game);
            var plusMatchup = PlusMatchup(
                player,
                nextOppTeam,
                player.CurrTeam);
            var matchupLink = nextOppTeam.DefensiveUnitMatchUp(
                player.PlayerCat,
                plusMatchup,
                bLinks);
            var owners = player.LoadAllOwners();

            calculator.Calculate(
                player,
                game);
            var namePart = bLinks
                                ? RoleLink(player)
                                : $"{player.PlayerNameTo(11)}";

            if (player.PlayerCat.Equals(
                    Constants.K_KICKER_CAT))
            {
                AddPickup(
                    player,
                    game,
                    " ",
                    DomeBit(game, player));
                return(string.Format(" {0,-11}  {1}  {2,2:#0}{3} {4}",
                                     namePart,
                                     owners,
                                     player.Points,
                                     DomeBit(game, player),
                                     ActualOutput(
                                         game: game,
                                         player: player,
                                         runners: null)));
            }
            AddPickup(
                player,
                game,
                matchupLink,
                DomeBit(game, player));
            return(string.Format("{6}{0,-11}{7} {3}  {1}  {2,2:#0}{5} {4}",
                                 namePart,
                                 matchupLink, //  defensiveRating,
                                 player.Points,
                                 owners,
                                 ActualOutput(
                                     game: game,
                                     player: player,
                                     runners: runners),
                                 DomeBit(game, player),
                                 ReturnerBit(player),
                                 ShortYardageBit(player)));
        }