|
|
|
|
@ -20,6 +20,7 @@ public class BoatInRace extends Boat {
|
|
|
|
|
private long timeFinished;
|
|
|
|
|
private Color colour;
|
|
|
|
|
private boolean finished = false;
|
|
|
|
|
private StringProperty currentLegName;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Constructor method.
|
|
|
|
|
@ -30,6 +31,7 @@ public class BoatInRace extends Boat {
|
|
|
|
|
public BoatInRace(String name, double velocity, Color colour, String abbrev) {
|
|
|
|
|
super(name, velocity, abbrev);
|
|
|
|
|
setColour(colour);
|
|
|
|
|
currentLegName = new SimpleStringProperty("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -90,14 +92,10 @@ public class BoatInRace extends Boat {
|
|
|
|
|
*/
|
|
|
|
|
public void setCurrentLeg(Leg currentLeg) {
|
|
|
|
|
this.currentLeg = currentLeg;
|
|
|
|
|
this.currentLegName.setValue(currentLeg.getName());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public StringProperty getCurrentLegName(){
|
|
|
|
|
|
|
|
|
|
StringProperty currentLegName = new SimpleStringProperty("");
|
|
|
|
|
if (currentLeg != null) {
|
|
|
|
|
currentLegName.setValue(currentLeg.getName());
|
|
|
|
|
}
|
|
|
|
|
return currentLegName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|