private static void SpitPlayer(NFLPlayer p, XmlTextWriter writer)
        {
            var ep = Masters.Epm.GetEp(p.PlayerCode);

            if (ep == -1.0M)
            {
                if (p.PerformanceList == null)
                {
                    p.LoadPerformances(Config.AllGames, false, Utility.CurrentSeason());
                }
                if (p.PerformanceList != null)
                {
                    if (p.PerformanceList.Count == 0)
                    {
                        p.LoadPerformances(Config.AllGames, false, Utility.CurrentSeason());
                    }
                }
                p.CalculateEp(Utility.CurrentSeason());
            }
            else
            {
                p.ExperiencePoints = ep;
                p.PerformanceList  = Masters.Epm.GetGameList(p.PlayerCode);
            }

            writer.WriteStartElement("player");

            WriteElement(writer, "id", p.PlayerCode);
            WriteElement(writer, "name", p.PlayerName);
            WriteElement(writer, "ep", p.ExperiencePoints.ToString());
            WriteEpList(writer, p);
            writer.WriteEndElement();
        }
        public void TestPlayerLoadPerfForDanarioAlexander()
        {
            var player = new NFLPlayer("ALEXDA03");

            Assert.IsNotNull(player);
            player.LoadPerformances(true, false, "2012");
            var nGames = player.PerformanceList.Count;

            Assert.AreEqual(60, nGames);
        }
        private static void SpitPlayer(NFLPlayer p, XmlTextWriter writer)
        {
            var ep = Masters.Epm.GetEp(p.PlayerCode);
            if (ep == -1.0M)
            {
                if (p.PerformanceList == null) p.LoadPerformances(Config.AllGames, false, Utility.CurrentSeason());
                if (p.PerformanceList != null)
                    if (p.PerformanceList.Count == 0) p.LoadPerformances(Config.AllGames, false, Utility.CurrentSeason());
                p.CalculateEp(Utility.CurrentSeason());
            }
            else
            {
                p.ExperiencePoints = ep;
                p.PerformanceList = Masters.Epm.GetGameList(p.PlayerCode);
            }

            writer.WriteStartElement("player");

            WriteElement(writer, "id", p.PlayerCode);
            WriteElement(writer, "name", p.PlayerName);
            WriteElement(writer, "ep", p.ExperiencePoints.ToString());
            WriteEpList(writer, p);
            writer.WriteEndElement();
        }