Added abstract class for all javafx object that a displayed during race. Began refactoring of mark implementation to be a subclass of the aforementioned abstract class.

This commit is contained in:
cir27
2017-04-26 21:16:22 +12:00
parent 95bafdc0d1
commit eaff4c5aac
7 changed files with 183 additions and 35 deletions
-12
View File
@@ -21,7 +21,6 @@ public class Boat {
private int markLastPast;
private String shortName;
private int id;
private Point2D currentPos;
public Boat(String teamName) {
this.teamName = teamName;
@@ -29,17 +28,8 @@ public class Boat {
this.lat = 0.0;
this.lon = 0.0;
this.shortName = "";
currentPos = null;
}
public boolean isSamePos(Point2D newPos){
if(newPos.equals(currentPos)){
return true;
} else {
currentPos = newPos;
return false;
}
}
/**
* Represents a boat in the race.
@@ -53,8 +43,6 @@ public class Boat {
this.velocity = boatVelocity;
this.shortName = shortName;
this.id = id;
currentPos = null;
}
/**