diff options
Diffstat (limited to 'Week14 Route 66/src/OO14route66')
-rw-r--r-- | Week14 Route 66/src/OO14route66/Car.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Week14 Route 66/src/OO14route66/Car.java b/Week14 Route 66/src/OO14route66/Car.java index 0058d8d..97d7b33 100644 --- a/Week14 Route 66/src/OO14route66/Car.java +++ b/Week14 Route 66/src/OO14route66/Car.java @@ -35,6 +35,7 @@ public class Car { * - choose a random speed * - set right location, direction and colour * - create new Driver object + * - say hello to the Overviewer * * @param number of the car * @param model the model the car is in @@ -48,6 +49,7 @@ public class Car { colour = carColours[number % carColours.length]; driver = new Driver(this); this.model = model; + Overviewer.getInstance().hello(this); } /** @@ -95,7 +97,6 @@ public class Car { */ public void step() { location = getNewLocation(); - Overviewer.getInstance().setLocation(this, location); model.update(); } |