From 0e3dfd140e77d9fda377bcccbf836f7ecfce8ed7 Mon Sep 17 00:00:00 2001 From: DylanVsn <43576618+DylanVsn@users.noreply.github.com> Date: Wed, 16 Oct 2019 13:50:10 +0200 Subject: [PATCH] =?UTF-8?q?on=20enl=C3=A8ve=20que=20quand=20c'est=20dans?= =?UTF-8?q?=20la=20queue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commandSystem/BasicInstructionQueue.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commandSystem/BasicInstructionQueue.java b/src/commandSystem/BasicInstructionQueue.java index 7e54d7f..5f1b4f6 100644 --- a/src/commandSystem/BasicInstructionQueue.java +++ b/src/commandSystem/BasicInstructionQueue.java @@ -95,7 +95,8 @@ public class BasicInstructionQueue implements InstructionQueue { case REACHEDFLOORSIGNAL: currentFloor = event.getCurrentFloor(); currentDirection = event.getCurrentDirection(); - removeInstruction(currentFloor); + if (currentFloor == getNextInstruction()) + removeInstruction(currentFloor); break; default: