public void RequestFloor(Elevator elevator, int requestedFloor)
 {
     Console.WriteLine($"User request Floor: {requestedFloor} with Selected Elevator #: {elevator.id} at Floor: {elevator.currentFloor}");
     elevator.AddToQueue(requestedFloor);
     elevator.CloseDoor();
     elevator.MoveElevator();
 }
Example #2
0
 public void RequestFloor(Elevator elevator, int requestedFloor)
 {
     Console.WriteLine($"Request Floor: {requestedFloor}, with elevator: {elevator.id}, and current floor: {elevator.currentFloor}");
     elevator.AddQueue(requestedFloor);
     elevator.CloseDoor();
     elevator.MoveElevator();
 }
 public override void CloseDoor()
 {
     Elevator.CloseDoor();
     Elevator.State = Elevator.DoorClosedState;
 }