private List <DraftPlayer> CreatePlayers(int playerCount, CardRatings ratings, bool includeHumanPlayer) { var aiStrategies = new Func <IDraftingStrategy>[] { () => new Forcing(ratings), () => new Greedy(ratings), }; var players = new List <DraftPlayer>(); for (var i = 0; i < playerCount; i++) { players.Add(new DraftPlayer { Strategy = aiStrategies[RandomEx.Next(10) >= 3 ? 0 : 1]() }); } if (includeHumanPlayer) { players[0] = new DraftPlayer { Strategy = _userInterface }; } return(players); }
private List<DraftPlayer> CreatePlayers(int playerCount, CardRatings ratings, bool includeHumanPlayer) { var aiStrategies = new Func<IDraftingStrategy>[] { () => new Forcing(ratings), () => new Greedy(ratings), }; var players = new List<DraftPlayer>(); for (var i = 0; i < playerCount; i++) { players.Add(new DraftPlayer { Strategy = aiStrategies[RandomEx.Next(10) >= 3 ? 0 : 1]() }); } if (includeHumanPlayer) { players[0] = new DraftPlayer { Strategy = _userInterface }; } return players; }