public GameManager(Player[] players, int roundsToPlay, AIBidType[] bidAITypes, AIGameType[] gameAITypes) { Players = players; aiPlayers = new Dictionary<Player, AI>(); for (int i = 0; i < 4; i++) { aiPlayers.Add(players[i], AIFactory.CreateAI(players[i], this, bidAITypes[i], gameAITypes[i])); } RoundsToPlay = roundsToPlay; RoundNumber = 1; IsGameInProgress = true; Round = new Round(players); }
public static IBidAI CreateBidAI(Player player, GameManager game, AIBidType type) { switch (type) { case AIBidType.BASIC: return new BaseBidAI(player, game); case AIBidType.CAUTIOUS: return new CautiousBidAI(player, game); case AIBidType.SIMGAME: return new SimulateGameBidAI(player, game); case AIBidType.OMNISCIENT: return new BidSearchAI(game); } throw new ApplicationException(); }
public static AI CreateAI(Player player, GameManager game, AIBidType bidType, AIGameType gameType) { return new AI(player, CreateBidAI(player, game, bidType), CreateGameAI(player, game, gameType)); }