Ejemplo n.º 1
0
 public State()
 {
     details       = new StateDetails();
     tempEffects   = new List <TemporaryEnhancementAbility>();
     step          = 1;
     previousState = null;
     leadingAction = null;
 }
Ejemplo n.º 2
0
        // Makes a new state which was arrived at by performing an action from a
        // previous state.
        public State(State oldState, Ability leadingAction)
        {
            this.details = oldState.details;

            this.previousState = oldState; // do we need to clone here?
            this.leadingAction = leadingAction;

            this.step   = oldState.step + 1;
            tempEffects = new List <TemporaryEnhancementAbility>(oldState.tempEffects);
        }
Ejemplo n.º 3
0
        // Makes an exact copy of the original state
        public State(State oldState)
        {
            Debug.Assert(oldState != null);

            this.details = oldState.details;

            this.previousState = oldState.previousState; // do we need to clone here?
            this.leadingAction = oldState.leadingAction;
            this.step          = oldState.step;
            tempEffects        = new List <TemporaryEnhancementAbility>(oldState.tempEffects);
        }