예제 #1
0
        public static void Main(string[] args)
        {
            ElevatorController elevator_controller = new ElevatorController(10, 2);

            elevator_controller.elevator_list[0].currentFloor = 3;
            elevator_controller.elevator_list[0].direction    = null;
            elevator_controller.elevator_list[0].status       = "IDLE";
            elevator_controller.elevator_list[0].floorList    = new List <int>();

            elevator_controller.elevator_list[1].currentFloor = 10;
            elevator_controller.elevator_list[1].direction    = null;
            elevator_controller.elevator_list[1].status       = "IDLE";
            elevator_controller.elevator_list[1].floorList    = new List <int>();

            elevator_controller.requestElevator(10, "DOWN");
            elevator_controller.RequestFloor(1, 9);
            elevator_controller.requestElevator(3, "DOWN");
            elevator_controller.RequestFloor(1, 2);
        }
        public static void Main(string[] args)
        {
            ElevatorController elevator_controller = new ElevatorController(10, 2);

            elevator_controller.elevator_list[0].currentFloor = 3;
            elevator_controller.elevator_list[0].direction    = null;
            elevator_controller.elevator_list[0].status       = "IDLE";
            elevator_controller.elevator_list[0].floorList    = new List <int>();

            elevator_controller.elevator_list[1].currentFloor = 10;
            elevator_controller.elevator_list[1].direction    = null;
            elevator_controller.elevator_list[1].status       = "IDLE";
            elevator_controller.elevator_list[1].floorList    = new List <int>();
            //HELLO, PLEASE ENTER VALID DATA TO OPERATE THE ELEVATOR
            elevator_controller.requestElevator(10, "DOWN");
            elevator_controller.RequestFloor(1, 9);
            elevator_controller.requestElevator(3, "DOWN");
            elevator_controller.RequestFloor(1, 2);
        }