Ejemplo n.º 1
0
 public static bool TryApply(this GameState state, IGameAction action)
 {
     if ((action != null) && action.CanApply(state))
     {
         state.Version++;
         action.Apply(state);
         return(true);
     }
     return(false);
 }