|
|
|
@ -1,5 +1,6 @@
|
|
|
|
package seng302.Model;
|
|
|
|
package seng302.Model;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javafx.beans.property.IntegerProperty;
|
|
|
|
import javafx.beans.property.SimpleStringProperty;
|
|
|
|
import javafx.beans.property.SimpleStringProperty;
|
|
|
|
import javafx.beans.property.StringProperty;
|
|
|
|
import javafx.beans.property.StringProperty;
|
|
|
|
import javafx.scene.paint.Color;
|
|
|
|
import javafx.scene.paint.Color;
|
|
|
|
@ -24,6 +25,7 @@ public class BoatInRace extends Boat {
|
|
|
|
private boolean finished = false;
|
|
|
|
private boolean finished = false;
|
|
|
|
private StringProperty currentLegName;
|
|
|
|
private StringProperty currentLegName;
|
|
|
|
private boolean started = false;
|
|
|
|
private boolean started = false;
|
|
|
|
|
|
|
|
private StringProperty position;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Constructor method.
|
|
|
|
* Constructor method.
|
|
|
|
@ -36,6 +38,7 @@ public class BoatInRace extends Boat {
|
|
|
|
super(name, velocity, abbrev);
|
|
|
|
super(name, velocity, abbrev);
|
|
|
|
setColour(colour);
|
|
|
|
setColour(colour);
|
|
|
|
currentLegName = new SimpleStringProperty("");
|
|
|
|
currentLegName = new SimpleStringProperty("");
|
|
|
|
|
|
|
|
position = new SimpleStringProperty("-");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@ -235,4 +238,16 @@ public class BoatInRace extends Boat {
|
|
|
|
public void setStarted(boolean started) {
|
|
|
|
public void setStarted(boolean started) {
|
|
|
|
this.started = started;
|
|
|
|
this.started = started;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getPosition() {
|
|
|
|
|
|
|
|
return position.get();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public StringProperty positionProperty() {
|
|
|
|
|
|
|
|
return position;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setPosition(int position) {
|
|
|
|
|
|
|
|
this.position.set(Integer.toString(position + 1));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|