public object Clone() { AdaptationRule ar = (AdaptationRule)this.MemberwiseClone(); ar.description = (description != null ? description : null); ar.gameState = (AdaptedState)gameState.Clone(); ar.id = (id != null ? id : null); ar.uolState = new List <UOLProperty>(); foreach (UOLProperty uolp in uolState) { ar.uolState.Add((UOLProperty)uolp.Clone()); } return(ar); }
/** * Adds a new rule to the structure */ public void addRule(AdaptationRule rule, int index) { this.rules.Insert(index, rule); }
/** * Adds a new rule to the structure */ public void addRule(AdaptationRule rule) { this.rules.Add(rule); }