コード例 #1
0
        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));
            }
        }
コード例 #2
0
 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;
 }