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