예제 #1
0
 public void DoActionSingle(GameAction action)
 {
     Game.CurrentTurn.SetCurrentAction(action.State, action.Location);
     if (!_context.NameToState.ContainsKey(action.State))
     {
         _context = ActionContextFactory.GetContext(action.State, Game);
     }
     _context.DoAction(action);
     Game.CurrentTurn.AddCompletedAction(action);
 }
예제 #2
0
        public bool IsValidGameState(GameAction action)
        {
            var context = ActionContextFactory.GetContext(action.State, Game);

            return(context.IsValidGameState(action));
        }
예제 #3
0
 public ActionContextInvoker(Game game)
 {
     Game     = game;
     _context = ActionContextFactory.GetContext(game.CurrentTurn.CurrentAction.State, game);
 }