Skip to content

Commit 1833671

Browse files
authored
Remove distanceDriven from Need for Speed examples (#2838)
This is to reflect the changes from 4dc6768, where the preferred solution was changed to NOT call this method. This is for exercism/java-analyzer#216
1 parent 5f25754 commit 1833671

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

exercises/concept/need-for-speed/.docs/instructions.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ int speed = 5;
7777
int batteryDrain = 2;
7878
var car = new NeedForSpeed(speed, batteryDrain);
7979

80-
int distance = 100;
81-
var race = new RaceTrack(distance);
80+
int distance1 = 100;
81+
var race1 = new RaceTrack(distance1);
8282

83-
car.distanceDriven()
84-
// => 0
83+
int distance2 = 300;
84+
var race2 = new RaceTrack(distance2);
8585

86-
race.canFinishRace(car);
86+
race1.canFinishRace(car);
8787
// => true
8888

89-
car.distanceDriven()
90-
// => 100
89+
race2.canFinishRace(car);
90+
// => false
9191
```

0 commit comments

Comments
 (0)