public static NullField GetInstance()
 {
     if (NullField.Instance == null)
     {
         NullField.Instance = new NullField();
     }
     return(NullField.Instance);
 }
Beispiel #2
0
        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();
        }
Beispiel #3
0
        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>();
        }