|
|
|
|
@ -84,7 +84,9 @@ public class ResizableRaceCanvas extends Canvas {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void displayBoat(Boat boat, double angle, Color colour) {
|
|
|
|
|
GraphCoordinate pos = this.map.convertGPS(boat.getCurrentPosition());
|
|
|
|
|
GraphCoordinate pos = this.map.convertGPS(boat.getCurrentPosition());/*
|
|
|
|
|
System.out.println(String.format("x%s y%s", pos.getX(), pos.getY()));
|
|
|
|
|
System.exit(0);*/
|
|
|
|
|
Paint paint = colour;
|
|
|
|
|
|
|
|
|
|
double[] x = {pos.getX() - 6, pos.getX(), pos.getX() + 6};
|
|
|
|
|
@ -325,8 +327,6 @@ public class ResizableRaceCanvas extends Canvas {
|
|
|
|
|
*/
|
|
|
|
|
public void updateBoats() {
|
|
|
|
|
int currentColour = 0;
|
|
|
|
|
// TODO Remove null when boats are ready
|
|
|
|
|
boats = null;
|
|
|
|
|
if (boats != null) {
|
|
|
|
|
for (Boat boat : boats) {
|
|
|
|
|
boolean finished = boat.getCurrentLeg().getName().equals("Finish") || boat.getCurrentLeg().getName().equals("DNF");
|
|
|
|
|
@ -344,8 +344,8 @@ public class ResizableRaceCanvas extends Canvas {
|
|
|
|
|
|
|
|
|
|
if (raceAnno)
|
|
|
|
|
displayText(boat.toString(), boat.getAbbrev(), boat.getVelocity(), this.map.convertGPS(boat.getCurrentPosition()));
|
|
|
|
|
|
|
|
|
|
drawTrack(boat, colours.get(currentColour));
|
|
|
|
|
//TODO this needs to be fixed.
|
|
|
|
|
//drawTrack(boat, colours.get(currentColour));
|
|
|
|
|
currentColour = (currentColour + 1) % colours.size();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|