Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public static IGameAI CreateGameAI(Player player, GameManager game, AIGameType type)
 {
     switch (type)
     {
         case AIGameType.BASIC:
             return new BaseGameAI(player, game);
         case AIGameType.MEMORY:
             return new MemoryAI(player, game);
         case AIGameType.PERFECTMEMORY:
             return new PerfectMemoryAI(player, game);
         case AIGameType.BRUTEFORCE:
             return new BruteForceAI(player, game);
         case AIGameType.OMNISCIENT:
             return new OmniscentSearchAI(game, new StandardReferee());
     }
     throw new ApplicationException();
 }
Exemplo n.º 3
0
 public static AI CreateAI(Player player, GameManager game, AIBidType bidType, AIGameType gameType)
 {
     return new AI(player, CreateBidAI(player, game, bidType), CreateGameAI(player, game, gameType));
 }