Esempio n. 1
0
 /// <summary>Initializes the search with the given game instance.</summary>
 protected GameSearchBase(ITurnBasedGame <StateType, ActionType> game)
 {
     if (game == null)
     {
         throw new ArgumentNullException();
     }
     this.game = game;
 }
        public void Handle(ITurnBasedGame game, IRequest request)
        {
            if (request is JoinGameRequest)
            {
                //todo: add player to game

                // change state
                //game.GameState = new InProgressGameState();
            }
            else if (request is MakeMoveRequest)
            {
                throw new GameNotReadyException();
            }
        }
Esempio n. 3
0
 /// <summary>Initializes the <see cref="MaxSearch{S,A}"/> with the given game instance.</summary>
 public MaxSearch(ITurnBasedGame <StateType, ActionType> game) : base(game)
 {
 }
Esempio n. 4
0
 /// <summary>Initializes the <see cref="AlphaBetaSearch{S,A}"/> with the given game instance.</summary>
 public AlphaBetaSearch(ITurnBasedGame <StateType, ActionType> game) : base(game)
 {
 }
 public void Handle(ITurnBasedGame game, IRequest request)
 {
     throw new NotImplementedException();
 }