示例#1
0
 public static GroundFloor Get()
 {
     if (instance == null)
     {
         instance = new GroundFloor();
     }
     return(instance);
 }
示例#2
0
        public void Main()
        {
            eFloor      = new EFloor[Capacities.Get("NumberOfFloors")];
            lift        = new Lift();
            groundFloor = LocationSingletory.GetLocation(0) as GroundFloor;
            int i = 1;

            while (i <= eFloor.Length)
            {
                var newFloor = LocationSingletory.GetLocation(i) as EFloor;
                eFloor[i - 1] = newFloor;
                i++;
            }
            getVisitors();
            lift.Operate();
            printStats();
        }