Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Commit

Permalink
Update Restaurant.java
Browse files Browse the repository at this point in the history
  • Loading branch information
dulldesk committed Jun 21, 2020
1 parent 545d07e commit cf5ce28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Restaurant.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit cf5ce28

Please sign in to comment.