From cf5ce288801dea8d440180a3fde8dc7eb7e23d0c Mon Sep 17 00:00:00 2001 From: dulldesk <54601393+dulldesk@users.noreply.github.com> Date: Sun, 21 Jun 2020 02:04:42 -0400 Subject: [PATCH] Update Restaurant.java --- Restaurant.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Restaurant.java b/Restaurant.java index 6d50240..e6ca6a0 100644 --- a/Restaurant.java +++ b/Restaurant.java @@ -352,6 +352,7 @@ private void drawCustomer(Graphics g) { castedCustomer.setCurrentAction("standing"); castedCustomer.setDirection('N'); takeOrder(); + initialLiveTask = false; } } else if (castedCustomer.getCurrentAction().equals("walk left")) { if (customer.getX() > castedCustomer.getXTarget()) customer.moveLeft(); @@ -429,9 +430,10 @@ public void paintComponent(Graphics g) { drawCustomer(g); // check whether the live level has been completed - if (!inTraining && listIsCompleted()) { + if (!inTraining && listIsCompleted() && !initialLiveTask) { for (String key : openedStations.keySet()) openedStations.put(key, false); openedStations.put("Exit", true); + initialLiveTask = true; intro = new Dialogue("You've finished your work shift! Go to the arrow (and face in that direction) to exit the restaurant", "Coworker"); repaint(); }