on enlève que quand c'est dans la queue

This commit is contained in:
DylanVsn 2019-10-16 13:50:10 +02:00
parent 7a1ca1ef65
commit 0e3dfd140e

View File

@ -95,6 +95,7 @@ public class BasicInstructionQueue implements InstructionQueue {
case REACHEDFLOORSIGNAL: case REACHEDFLOORSIGNAL:
currentFloor = event.getCurrentFloor(); currentFloor = event.getCurrentFloor();
currentDirection = event.getCurrentDirection(); currentDirection = event.getCurrentDirection();
if (currentFloor == getNextInstruction())
removeInstruction(currentFloor); removeInstruction(currentFloor);
break; break;