Skip to content

Commit

Permalink
Remove distanceDriven from Need for Speed examples (#2838)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kahgoh authored Oct 1, 2024
1 parent 5f25754 commit 1833671
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions exercises/concept/need-for-speed/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ int speed = 5;
int batteryDrain = 2;
var car = new NeedForSpeed(speed, batteryDrain);

int distance = 100;
var race = new RaceTrack(distance);
int distance1 = 100;
var race1 = new RaceTrack(distance1);

car.distanceDriven()
// => 0
int distance2 = 300;
var race2 = new RaceTrack(distance2);

race.canFinishRace(car);
race1.canFinishRace(car);
// => true

car.distanceDriven()
// => 100
race2.canFinishRace(car);
// => false
```

0 comments on commit 1833671

Please sign in to comment.