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); }
public bool IsValidGameState(GameAction action) { var context = ActionContextFactory.GetContext(action.State, Game); return(context.IsValidGameState(action)); }
public ActionContextInvoker(Game game) { Game = game; _context = ActionContextFactory.GetContext(game.CurrentTurn.CurrentAction.State, game); }