public class Race extends java.lang.Object implements IRaceEngine
Constructor and Description |
---|
Race() |
Modifier and Type | Method and Description |
---|---|
void |
decideWinner()
Decides the winner of the race based
on the time
|
void |
runRace()
Executes the race
|
void |
setupVehicle(java.lang.String pedalType,
java.lang.String brakeType,
java.lang.String name,
double velocity)
Creates the vehicles that are going
to participate in the race.
|
void |
setupVehicles()
Helper method, constructing 3 bicycles
to quickly setup a race between the vehicles.
|
public void decideWinner()
public void runRace()
runRace
in interface IRaceEngine
public void setupVehicle(java.lang.String pedalType, java.lang.String brakeType, java.lang.String name, double velocity)
setupVehicle
in interface IRaceEngine
public void setupVehicles()
setupVehicles
in interface IRaceEngine