private static void SetUpDraft() { var teams = new List<Team> { new Team("Team1", "T1"), new Team("Team2", "T2"), new Team("Team3", "T3"), new Team("Team4", "T4") }; var settings = new DraftSettings(); settings.IsRandomOrder = false; settings.Seed = 6; settings.IsSnakeDraft = true; settings.NumberOfRounds = 5; settings.NumberOfTeams = 4; var ratingUpdate = new RatingUpdate(); var league = LeagueFactory.CreateLeague(teams, new List<Transaction>(), settings, new List<Player>(), new List<RatingUpdate>(), null); var draft = league.CreateDraft(settings); Console.WriteLine("All draft picks:"); foreach (var pickingTeam in draft.GetAllPicks()) { Console.WriteLine(string.Format(" ({0}) {1}: {2}", (pickingTeam.PickNumber-1) / 4, ((pickingTeam.PickNumber-1) % 4) + 1, pickingTeam.Owner)); } }
public LeagueModel(List<Team> teams, List<Transaction> transactions, DraftSettings draftSettings, List<Player> players, List<RatingUpdate> ratingUpdates, RatingUpdate selectedRatingUpdate) { Teams = teams; Transactions = transactions; DraftSettings = draftSettings; Players = players; RatingUpdates = ratingUpdates; SelectedRatingUpdate = selectedRatingUpdate; }
public static DraftSettings GetDraftSettings1() { var draftSettings = new DraftSettings { Seed = 0, IsRandomOrder = false, IsSnakeDraft = true, NumberOfRounds = 2, NumberOfTeams = 4 }; return draftSettings; }
// To Be Updated... public Draft CreateDraft(DraftSettings settings) { Draft = new Draft(_model.Teams, settings); return Draft; }