Пример #1
0
 public Clinic(string name, int capacity)
 {
     this.Name = name;
     this.BuildClinic(capacity);
     this.addEnumerator     = new AddEnumerator <Room>(this.Rooms);
     this.releaseEnumerator = new ReleaseEnumerator <Room>(this.Rooms);
 }
Пример #2
0
        public bool Release()
        {
            this.releaseEnumerator = new ReleaseEnumerator <Room>(this.Rooms);
            var fullRoom = this.releaseEnumerator.FirstOrDefault(room => !room.IsEmpty);

            if (fullRoom == null)
            {
                return(false);
            }

            fullRoom.ReleasePet();

            return(true);
        }