Changed it so Boat can be used as a superclass for StreamedBoat and BoatInRace properly and removed ConstantVelocityRace. Everything that used to use BoatInRace or StreamedBoat now uses it superclass (boat). #pair[jjg64, cbt24] #refactor #story[782]

This commit is contained in:
Joseph Gardner
2017-04-28 12:35:00 +12:00
parent 3d284c4a2b
commit f377cf6471
16 changed files with 572 additions and 498 deletions
@@ -17,7 +17,7 @@ import java.util.List;
* @deprecated use {@link seng302.Mock.StreamedCourseXMLReader}
*/
public class RaceXMLReader extends XMLReader implements RaceDataSource {
private List<BoatInRace> boats = new ArrayList<>();
private List<Boat> boats = new ArrayList<>();
private Color[] colors = {Color.BLUEVIOLET, Color.BLACK, Color.RED, Color.ORANGE, Color.DARKOLIVEGREEN, Color.LIMEGREEN};//TODO make this established in xml or come up with a better system.
private List<Leg> legs = new ArrayList<>();
private GPSCoordinate mark, startPt1, startPt2, finishPt1, finishPt2, leewardPt1, leewardPt2, windwardPt1, windwardPt2;
@@ -269,7 +269,7 @@ public class RaceXMLReader extends XMLReader implements RaceDataSource {
return null;
}
public List<BoatInRace> getBoats() {
public List<Boat> getBoats() {
return boats;
}