public static NullField GetInstance() { if (NullField.Instance == null) { NullField.Instance = new NullField(); } return(NullField.Instance); }
public void Restore(FieldMemento Memento) { this.SetStateSimple(Memento.State); this.NextInChain = NullField.GetInstance(); this.Hero = null; this.Resource = Memento.Resource == null ? null : Memento.Resource.ProduceOrigin(); }
public Field(int x, int y) { this.NextInChain = NullField.GetInstance(); this.Hero = null; this.State = FieldStateNormal.GetInstance(); this.x = x; this.y = y; this.Observers = new List <Observer>(); }