Exemplo n.º 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);
 }
Exemplo n.º 2
0
        public bool IsValidGameState(GameAction action)
        {
            var context = ActionContextFactory.GetContext(action.State, Game);

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