|
|
|
@ -6,6 +6,7 @@ import javafx.scene.canvas.GraphicsContext;
|
|
|
|
import javafx.scene.control.TableView;
|
|
|
|
import javafx.scene.control.TableView;
|
|
|
|
import javafx.scene.paint.Color;
|
|
|
|
import javafx.scene.paint.Color;
|
|
|
|
import javafx.scene.paint.Paint;
|
|
|
|
import javafx.scene.paint.Paint;
|
|
|
|
|
|
|
|
import javafx.scene.shape.Line;
|
|
|
|
import seng302.Coordinate;
|
|
|
|
import seng302.Coordinate;
|
|
|
|
import seng302.RaceMap;
|
|
|
|
import seng302.RaceMap;
|
|
|
|
|
|
|
|
|
|
|
|
@ -35,8 +36,12 @@ public class RaceController extends Controller{
|
|
|
|
this.gc = raceMap.getGraphicsContext2D();
|
|
|
|
this.gc = raceMap.getGraphicsContext2D();
|
|
|
|
this.map = new RaceMap(32.321989, -64.866142, 32.273089, -64.814987, (int)raceMap.getWidth(), (int)raceMap.getHeight());
|
|
|
|
this.map = new RaceMap(32.321989, -64.866142, 32.273089, -64.814987, (int)raceMap.getWidth(), (int)raceMap.getHeight());
|
|
|
|
|
|
|
|
|
|
|
|
Coordinate boat1coord = this.map.convertGPS(32.296577, -64.854304);
|
|
|
|
gc.setStroke(Color.GREEN);
|
|
|
|
System.out.println(boat1coord.getX() + " " + boat1coord.getY());
|
|
|
|
gc.setFill(Color.GREEN);
|
|
|
|
displayBoat(boat1coord, Color.AQUAMARINE);
|
|
|
|
Coordinate startline1 = this.map.convertGPS(32.296577, -64.854304);
|
|
|
|
|
|
|
|
Coordinate startline2 = this.map.convertGPS(32.293771, -64.855242);
|
|
|
|
|
|
|
|
gc.strokeLine(startline1.getX(), startline1.getY(), startline2.getX(), startline2.getY());
|
|
|
|
|
|
|
|
gc.fillOval(startline1.getX()-3, startline1.getY()-3, 6, 6);
|
|
|
|
|
|
|
|
gc.fillOval(startline2.getX()-3, startline2.getY()-3, 6, 6);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|