Пример #1
0
        static void Main(string[] args)
        {
            var elevatorController = new ElevatorController(10, 2);

            elevatorController.RequestElevator(1, "Up");
            elevatorController.RequestFloor(1, "Down");
        }
        static void Main(string[] args)
        {
            var elevatorController = new ElevatorController(10, 2);
            var selectedElevator   = elevatorController.RequestElevator(1, "Up");


            elevatorController.RequestFloor(selectedElevator, 8);
        }
Пример #3
0
        static void Main(string[] args)
        {
            List <Elevator> ElevatorList = new List <Elevator>();
            Elevator        elevator1    = new Elevator(1, 1);

            ElevatorList.Add(elevator1);

            ElevatorController Controller = new ElevatorController(10, 2);

            Console.WriteLine("Request elevator");
            Controller.RequestElevator(4, "up");
            Console.WriteLine("Request floor");
            Controller.RequestFloor(ElevatorList [0], 7);
        }