internal FantasySeason LoadSeason() { // TODO: Get the data here FantasySeason seasonToReturn = new FantasySeason(); seasonToReturn.Year = 2015; seasonToReturn.NumQB = 1; seasonToReturn.NumRB = 2; seasonToReturn.NumWR = 2; seasonToReturn.NumK = 1; seasonToReturn.NumFX = 1; seasonToReturn.NumDEF = 1; seasonToReturn.NumBN = 5; // TODO: get all teams here FantasyTeam teamJoe = new FantasyTeam("Joe", seasonToReturn, 1); FantasyTeam teamHank = new FantasyTeam("Hank", seasonToReturn, 2); seasonToReturn.FantasyTeams.Add(teamJoe); seasonToReturn.FantasyTeams.Add(teamHank); return seasonToReturn; }
public BestAvailableBot(FantasyTeam fantasyTeam) { FantasyTeam = fantasyTeam; RankedPlayers = ReadRankedPlayers(); }
public void UpdateTeam(FantasyTeam team) { DataContainer.Store(team); DataContainer.Commit(); }
public void CreateFakeFantasySeasons() { DeleteAllItemsByType(typeof(FantasySeason)); DeleteAllItemsByType(typeof(FantasyTeam)); FantasySeason season = new FantasySeason("Fake Season 1"); season.Year = 2015; season.NumQB = 1; season.NumRB = 2; season.NumWR = 2; season.NumTE = 2; season.NumK = 1; season.NumFX = 1; season.NumDEF = 1; season.NumBN = 5; FantasyTeam t1 = new FantasyTeam("Anthony", season, 1); FantasyTeam t2 = new FantasyTeam("Bob", season, 2); FantasyTeam t3 = new FantasyTeam("Charlie", season, 3); season.FantasyTeams.Add(t1); season.FantasyTeams.Add(t2); season.FantasyTeams.Add(t3); DataContainer.Store(t1.DraftBot); DataContainer.Store(t2.DraftBot); DataContainer.Store(t3.DraftBot); // Editmark: I belive the draft bot ranked players aren't being saved to the DB after population. Address here? DataContainer.Store(t1); DataContainer.Store(t2); DataContainer.Store(t3); DataContainer.Store(season); DataContainer.Commit(); }