Merge branch 'Story_76' into 'master'

Story 76

AC:  
Note: most sailing races take place on fairly standard courses: windward-leeward, triangular/Olympic, and so on. An (incomplete) list can be found at http://www.rya.org.uk/racing/race-officials/resource-centre/forms-data-diagrams-graphics/Pages/course-diagrams-other-graphics.aspx  
This story is related to Story 51 (generating course layouts). While 51 is concerned with orienting a course to the wind, this one relates to a library of common course layouts which could be adjusted before use by the method in 51   
  
  
  
 DOD:  
 Adheres to relevant architectural decisions.  
 Branch has latest version of master merged in.  
 All acceptance criteria sufficiently met.  
 mvn clean package with no errors.  
 All tests pass on CI.  
 Javadoc compiles without error. 1  
 Code passes our code review (see code quality standard).  
 New tests have been sufficiently written for new functions/classes/components.  
 Existing tests have been modified to correctly use new functions/classes/components.  
 Manual tests have been written and logged.  
 Related issues in the issue tracker should be linked to, and closed once merged.  
 DOD feature check carried out and successfully completed.  
 New step has been added to DOD feature check, if required.  
 All System.out.println() removed from program  

See merge request !39
main
Jessica Syder 8 years ago
commit a123bfb7e8

@ -21,7 +21,7 @@ public class App extends Application {
public void start(Stage primaryStage) { public void start(Stage primaryStage) {
try { try {
//TODO should read a configuration file to configure server? //TODO should read a configuration file to configure server?
Event raceEvent = new Event(false); Event raceEvent = new Event(false, 0);
} catch (Exception e) { } catch (Exception e) {

@ -18,6 +18,7 @@ import shared.exceptions.InvalidRegattaDataException;
import shared.exceptions.XMLReaderException; import shared.exceptions.XMLReaderException;
import shared.model.Bearing; import shared.model.Bearing;
import shared.model.Constants; import shared.model.Constants;
import shared.xml.XMLUtilities;
import javax.xml.bind.JAXBException; import javax.xml.bind.JAXBException;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
@ -79,9 +80,24 @@ public class Event {
* @param singlePlayer Whether or not to create a single player event. * @param singlePlayer Whether or not to create a single player event.
* @throws EventConstructionException Thrown if we cannot create an Event for any reason. * @throws EventConstructionException Thrown if we cannot create an Event for any reason.
*/ */
public Event(boolean singlePlayer) throws EventConstructionException { public Event(boolean singlePlayer, int mapIndex) throws EventConstructionException {
// System.out.println(XMLUtilities.validateXML(this.getClass().getClassLoader().getResource("mock/mockXML/iMapLayout.xml").toString()
// , this.getClass().getClassLoader().getResource("mock/mockXML/schema/raceSchema.xsd")));
String raceXMLFile;
switch (mapIndex){
case 0:raceXMLFile = "mock/mockXML/raceSixPlayers.xml";
break;
case 1:raceXMLFile = "mock/mockXML/oMapLayout.xml";
break;
case 2: raceXMLFile = "mock/mockXML/iMapLayout.xml";
break;
case 3: raceXMLFile = "mock/mockXML/mMapLayout.xml";
break;
default: raceXMLFile = "mock/mockXML/raceSixPlayers.xml";
String raceXMLFile = "mock/mockXML/raceTest.xml"; }
String boatsXMLFile = "mock/mockXML/boatTest.xml"; String boatsXMLFile = "mock/mockXML/boatTest.xml";
String regattaXMLFile = "mock/mockXML/regattaTest.xml"; String regattaXMLFile = "mock/mockXML/regattaTest.xml";

@ -42,6 +42,7 @@ public class SourceIdAllocator {
} }
List<Integer> allocatedIDs = mockRace.getRaceDataSource().getParticipants(); List<Integer> allocatedIDs = mockRace.getRaceDataSource().getParticipants();
List<Integer> allIDs = new ArrayList<>(mockRace.getBoatDataSource().getBoats().keySet()); List<Integer> allIDs = new ArrayList<>(mockRace.getBoatDataSource().getBoats().keySet());
//Get list of unallocated ids. //Get list of unallocated ids.

@ -46,7 +46,7 @@ public class Constants {
* The race preparatory time, in milliseconds. 1 minute. * The race preparatory time, in milliseconds. 1 minute.
*/ */
// public static final long RacePreparatoryTime = 60 * 1000; // public static final long RacePreparatoryTime = 60 * 1000;
public static final long RacePreparatoryTime = 3 * 1000; public static final long RacePreparatoryTime = 1 * 60 * 1000;

@ -1,26 +1,28 @@
package visualiser.Controllers; package visualiser.Controllers;
import com.interactivemesh.jfx.importer.stl.StlMeshImporter;
import javafx.animation.AnimationTimer;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.control.Alert; import javafx.scene.control.Button;
import javafx.scene.control.ButtonType; import javafx.scene.control.TextField;
import javafx.scene.control.SplitPane; import javafx.scene.image.Image;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane; import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane; import javafx.scene.layout.GridPane;
import javafx.scene.shape.MeshView; import javafx.stage.Stage;
import mock.app.Event; import mock.app.Event;
import org.xml.sax.SAXException;
import mock.exceptions.EventConstructionException; import mock.exceptions.EventConstructionException;
import visualiser.layout.Subject3D; import shared.exceptions.InvalidBoatDataException;
import visualiser.layout.View3D; import shared.exceptions.InvalidRaceDataException;
import shared.exceptions.InvalidRegattaDataException;
import shared.exceptions.XMLReaderException;
import javax.xml.bind.JAXBException;
import javax.xml.parsers.ParserConfigurationException;
import java.io.IOException; import java.io.IOException;
import java.net.Socket; import java.net.Socket;
import java.net.URL; import java.net.URL;
import java.util.Optional; import java.util.ArrayList;
import java.util.Arrays;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
@ -31,69 +33,48 @@ import java.util.logging.Logger;
public class HostController extends Controller { public class HostController extends Controller {
// @FXML
// TextField gameNameField;
//
// @FXML
// TextField hostNameField;
@FXML @FXML
private ImageView imageView; TextField gameNameField;
@FXML @FXML
AnchorPane hostWrapper; TextField hostNameField;
@FXML @FXML
AnchorPane imagePane; AnchorPane hostWrapper;
@FXML @FXML
SplitPane splitPane; Button previousButton;
@FXML @FXML
AnchorPane specPane; Button nextButton;
@FXML @FXML
GridPane playerContainer; ImageView mapImage;
private Event game; private Event game;
private View3D view3D; private ArrayList<Image> listOfMaps;
private int currentMapIndex = 0;
@Override
public void initialize(URL location, ResourceBundle resources) {
ObservableList<Subject3D> subjects = FXCollections.observableArrayList();
view3D = new View3D();
view3D.setItems(subjects);
playerContainer.add(view3D, 0,0);
URL asset = HostController.class.getClassLoader().getResource("assets/V1.2 Complete Boat.stl");
StlMeshImporter importer = new StlMeshImporter();
importer.read(asset);
Subject3D subject = new Subject3D(new MeshView(importer.getImport()));
subjects.add(subject);
view3D.setDistance(50);
view3D.setYaw(45);
view3D.setPitch(20);
AnimationTimer rotate = new AnimationTimer() {
@Override @Override
public void handle(long now) { public void initialize(URL location, ResourceBundle resources){
subject.setHeading(subject.getHeading().getAngle() + 0.1); Image ac35Map = new Image(getClass().getClassLoader().getResourceAsStream("images/AC35_Racecourse_MAP.png"));
} Image oMap = new Image(getClass().getClassLoader().getResourceAsStream("images/oMapLayout.png"));
}; Image iMap = new Image(getClass().getClassLoader().getResourceAsStream("images/iMapLayout.png"));
rotate.start(); Image mMap = new Image(getClass().getClassLoader().getResourceAsStream("images/mMapLayout.png"));
listOfMaps = new ArrayList(Arrays.asList(ac35Map, oMap, iMap, mMap));
mapImage.setImage(listOfMaps.get(currentMapIndex));
} }
/** /**
* Hosts a game * Hosts a game
* @throws IOException if socket cannot be connected to
*/ */
public void hostGamePressed() { public void hostGamePressed() throws IOException{
try { try {
this.game = new Event(false); this.game = new Event(false, currentMapIndex);
connectSocket("localhost", 4942); connectSocket("localhost", 4942);
} catch (EventConstructionException e) { } catch (EventConstructionException e) {
Logger.getGlobal().log(Level.SEVERE, "Could not create Event.", e); Logger.getGlobal().log(Level.SEVERE, "Could not create Event.", e);
@ -126,34 +107,30 @@ public class HostController extends Controller {
* Hosts a game. * Hosts a game.
*/ */
public void hostGame(){ public void hostGame(){
splitPane.setResizableWithParent(specPane, false); mapImage.fitWidthProperty().bind(((Stage) mapImage.getScene().getWindow()).widthProperty().multiply(0.6));
splitPane.lookupAll(".split-pane-divider").stream().forEach(div -> div.setMouseTransparent(true));
imageView.fitWidthProperty().bind(imagePane.widthProperty());
imageView.fitHeightProperty().bind(imagePane.heightProperty());
hostWrapper.setVisible(true); hostWrapper.setVisible(true);
} }
/**
* Menu button pressed. Prompt alert then return to menu
*/
public void menuBtnPressed(){ public void menuBtnPressed(){
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
alert.setTitle("Quitting race");
alert.setContentText("Do you wish to quit the race?");
alert.setHeaderText("You are about to quit the race");
Optional<ButtonType> result = alert.showAndWait();
if(result.get() == ButtonType.OK){
hostWrapper.setVisible(false); hostWrapper.setVisible(false);
parent.enterTitle(); parent.enterTitle();
} }
public void nextImage(){
increaseIndex();
mapImage.setImage(listOfMaps.get(currentMapIndex));
} }
/** public void previousImage(){
* Start button pressed. Currently only prints out start decreaseIndex();
*/ mapImage.setImage(listOfMaps.get(currentMapIndex));
public void startBtnPressed(){ }
//System.out.println("Should start the race. This button is only visible for the host"); private void increaseIndex(){
hostGamePressed(); currentMapIndex = (currentMapIndex + 1)%listOfMaps.size();
}
private void decreaseIndex(){
currentMapIndex = ((((currentMapIndex - 1)%listOfMaps.size())+listOfMaps.size())%listOfMaps.size());
} }
} }

@ -53,5 +53,39 @@
} }
#arrowImage { #arrowImage {
-fx-image: url("/visualiser/images/arrow.png"); -fx-graphic: url("/visualiser/images/arrow.png");
}
#nextButton {
-fx-background-image: url("/visualiser/images/ArrowRoundRight.png");
-fx-background-size: 60px;
-fx-background-repeat: no-repeat;
-fx-background-position: center center;
-fx-focus-color: transparent;
-fx-background-color: transparent;
}
#nextButton:pressed {
-fx-background-image: url("/visualiser/images/ArrowRoundRightClicked.png");
-fx-background-size: 60px;
-fx-background-repeat: no-repeat;
-fx-background-position: center center;
-fx-focus-color: transparent;
-fx-background-color: transparent;
}
#previousButton {
-fx-background-image: url("/visualiser/images/ArrowRoundLeft.png");
-fx-background-size: 60px;
-fx-background-repeat: no-repeat;
-fx-background-position: center center;
-fx-focus-color: transparent;
-fx-background-color: transparent;
}
#previousButton:pressed {
-fx-background-image: url("/visualiser/images/ArrowRoundLeftClicked.png");
-fx-background-size: 60px;
-fx-background-repeat: no-repeat;
-fx-background-position: center center;
-fx-focus-color: transparent;
-fx-background-color: transparent;
} }

@ -57,3 +57,37 @@
#arrowImage { #arrowImage {
-fx-image: url("/visualiser/images/arrowLight.png"); -fx-image: url("/visualiser/images/arrowLight.png");
} }
#nextButton {
-fx-background-image: url("/visualiser/images/ArrowRoundRight.png");
-fx-background-size: 60px;
-fx-background-repeat: no-repeat;
-fx-background-position: center center;
-fx-focus-color: transparent;
-fx-background-color: transparent;
}
#nextButton:pressed {
-fx-background-image: url("/visualiser/images/ArrowRoundRightClicked.png");
-fx-background-size: 60px;
-fx-background-repeat: no-repeat;
-fx-background-position: center center;
-fx-focus-color: transparent;
-fx-background-color: transparent;
}
#previousButton {
-fx-background-image: url("/visualiser/images/ArrowRoundLeft.png");
-fx-background-size: 60px;
-fx-background-repeat: no-repeat;
-fx-background-position: center center;
-fx-focus-color: transparent;
-fx-background-color: transparent;
}
#previousButton:pressed {
-fx-background-image: url("/visualiser/images/ArrowRoundLeftClicked.png");
-fx-background-size: 60px;
-fx-background-repeat: no-repeat;
-fx-background-position: center center;
-fx-focus-color: transparent;
-fx-background-color: transparent;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Race>
<RaceID>5326</RaceID>
<RaceType>FLEET</RaceType>
<CreationTimeDate>RACE_CREATION_TIME</CreationTimeDate>
<RaceStartTime Postpone="false" Time="RACE_START_TIME"/>
<Participants>
</Participants>
<CompoundMarkSequence>
<Corner SeqID="1" CompoundMarkID="1" Rounding="SP" ZoneSize="3" />
<Corner SeqID="2" CompoundMarkID="2" Rounding="Port" ZoneSize="3" />
<Corner SeqID="3" CompoundMarkID="4" Rounding="Starboard" ZoneSize="3" />
<Corner SeqID="4" CompoundMarkID="2" Rounding="Port" ZoneSize="3" />
<Corner SeqID="5" CompoundMarkID="3" Rounding="Port" ZoneSize="3" />
<Corner SeqID="7" CompoundMarkID="5" Rounding="SP" ZoneSize="3"/>
</CompoundMarkSequence>
<Course>
<CompoundMark CompoundMarkID="1" Name="Start Line">
<Mark SeqId="1" Name="PRO" TargetLat="1.681354" TargetLng="1.132354" SourceID="101"/>
<Mark SeqId="2" Name="PIN" TargetLat="1.681354" TargetLng="1.135604" SourceID="102"/>
</CompoundMark>
<CompoundMark CompoundMarkID="2" Name="Marker 1">
<Mark Name="Marker1" TargetLat="1.728713" TargetLng="1.131345" SourceID="103"/>
</CompoundMark>
<CompoundMark CompoundMarkID="3" Name="Marker 2">
<Mark Name="Marker2" TargetLat="1.725120" TargetLng="1.109701" SourceID="104"/>
</CompoundMark>
<CompoundMark CompoundMarkID="4" Name="Gate 1">
<Mark Name="LGL" SeqId="1" TargetLat="1.707354" TargetLng="1.130505" SourceID="105"/>
<Mark Name="LGR" SeqId="2" TargetLat="1.707404" TargetLng="1.133304" SourceID="106"/>
</CompoundMark>
<CompoundMark CompoundMarkID="5" Name="Finish Line">
<Mark Name="FL" SeqId="1" TargetLat="1.690202" TargetLng="1.109606" SourceID="107"/>
<Mark Name="FR" SeqId="2" TargetLat="1.692202" TargetLng="1.112629" SourceID="108"/>
</CompoundMark>
</Course>
<CourseLimit>
<Limit Lat="1.73558" Lon="1.105505" SeqID="1"/>
<Limit Lat="1.732444" Lon="1.137105" SeqID="2"/>
<Limit Lat="1.680404" Lon="1.140505" SeqID="3"/>
<Limit Lat="1.675232" Lon="1.122202" SeqID="4"/>
<Limit Lat="1.685101" Lon="1.120222" SeqID="5"/>
<Limit Lat="1.680101" Lon="1.102505" SeqID="6"/>
</CourseLimit>
</Race>

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Race>
<RaceID>5326</RaceID>
<RaceType>FLEET</RaceType>
<CreationTimeDate>RACE_CREATION_TIME</CreationTimeDate>
<RaceStartTime Postpone="false" Time="RACE_START_TIME"/>
<Participants>
</Participants>
<CompoundMarkSequence>
<Corner SeqID="1" CompoundMarkID="1" Rounding="SP" ZoneSize="3" />
<Corner SeqID="2" CompoundMarkID="2" Rounding="Starboard" ZoneSize="3" />
<Corner SeqID="3" CompoundMarkID="3" Rounding="Starboard" ZoneSize="3" />
<Corner SeqID="4" CompoundMarkID="2" Rounding="Starboard" ZoneSize="3" />
<Corner SeqID="5" CompoundMarkID="4" Rounding="SP" ZoneSize="3" />
</CompoundMarkSequence>
<Course>
<CompoundMark CompoundMarkID="1" Name="Start Line">
<Mark SeqId="1" Name="PRO" TargetLat="1.681354" TargetLng="1.132354" SourceID="101"/>
<Mark SeqId="2" Name="PIN" TargetLat="1.680354" TargetLng="1.135604" SourceID="102"/>
</CompoundMark>
<CompoundMark CompoundMarkID="2" Name="Marker 1">
<Mark Name="Marker1" TargetLat="1.780354" TargetLng="1.140600" SourceID="103"/>
</CompoundMark>
<CompoundMark CompoundMarkID="3" Name="Marker 2">
<Mark Name="Marker2" TargetLat="1.730354" TargetLng="1.137604" SourceID="104"/>
</CompoundMark>
<CompoundMark CompoundMarkID="4" Name="Finish Line">
<Mark SeqId="1" Name="FL" TargetLat="1.681354" TargetLng="1.132354" SourceID="105"/>
<Mark SeqId="2" Name="FR" TargetLat="1.680354" TargetLng="1.135604" SourceID="106"/>
</CompoundMark>
</Course>
<CourseLimit>
<Limit Lat="1.675354" Lon="1.122354" SeqID="1"/>
<Limit Lat="1.680354" Lon="1.141600" SeqID="2"/>
<Limit Lat="1.790354" Lon="1.146600" SeqID="3"/>
<Limit Lat="1.785354" Lon="1.127354" SeqID="4"/>
</CourseLimit>
</Race>

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Race>
<RaceID>5326</RaceID>
<RaceType>FLEET</RaceType>
<CreationTimeDate>RACE_CREATION_TIME</CreationTimeDate>
<RaceStartTime Postpone="false" Time="RACE_START_TIME"/>
<Participants>
</Participants>
<CompoundMarkSequence>
<Corner SeqID="1" CompoundMarkID="1" Rounding="SP" ZoneSize="3" />
<Corner SeqID="2" CompoundMarkID="2" Rounding="Port" ZoneSize="3" />
<Corner SeqID="3" CompoundMarkID="3" Rounding="Port" ZoneSize="3" />
<Corner SeqID="4" CompoundMarkID="4" Rounding="Starboard" ZoneSize="3" />
<Corner SeqID="5" CompoundMarkID="3" Rounding="Starboard" ZoneSize="3" />
<Corner SeqID="6" CompoundMarkID="4" Rounding="Port" ZoneSize="3" />
<Corner SeqID="7" CompoundMarkID="5" Rounding="SP" ZoneSize="3"/>
</CompoundMarkSequence>
<Course>
<CompoundMark CompoundMarkID="1" Name="Start Line">
<Mark SeqId="1" Name="PRO" TargetLat="-40.681354" TargetLng="174.132354" SourceID="101"/>
<Mark SeqId="2" Name="PIN" TargetLat="-40.608415" TargetLng="174.272430" SourceID="102"/>
</CompoundMark>
<CompoundMark CompoundMarkID="2" Name="Marker 1">
<Mark Name="Marker1" TargetLat="-40.118713" TargetLng="173.541839" SourceID="103"/>
</CompoundMark>
<CompoundMark CompoundMarkID="3" Name="Marker 2">
<Mark Name="Marker2" TargetLat="-40.53120" TargetLng="173.250701" SourceID="104"/>
</CompoundMark>
<CompoundMark CompoundMarkID="4" Name="Gate">
<Mark Name="WGL" SeqId="1" TargetLat="-40.722999" TargetLng="173.420989" SourceID="106"/>
<Mark Name="WGR" SeqId="2" TargetLat="-40.789575" TargetLng="173.294647" SourceID="107"/>
</CompoundMark>
<CompoundMark CompoundMarkID="5" Name="Finish Line">
<Mark Name="FL" SeqId="1" TargetLat="-40.968169" TargetLng="173.692901" SourceID="108"/>
<Mark Name="FR" SeqId="2" TargetLat="-40.878932" TargetLng="173.695648" SourceID="109"/>
</CompoundMark>
</Course>
<CourseLimit>
<Limit Lat="-40.984758" Lon="173.736846" SeqID="1"/>
<Limit Lat="-41.160757" Lon="173.140838" SeqID="2"/>
<Limit Lat="-39.937843" Lon="173.085906" SeqID="3"/>
<Limit Lat="-40.244616" Lon="174.420745" SeqID="4"/>
<Limit Lat="-40.627178" Lon="174.412505" SeqID="5"/>
<Limit Lat="-40.783337" Lon="174.093902" SeqID="6"/>
<Limit Lat="-40.612585" Lon="173.893401" SeqID="7"/>
<Limit Lat="-40.752134" Lon="173.723113" SeqID="8"/>
</CourseLimit>
</Race>

@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Race>
<RaceID>5326</RaceID>
<RaceType>FLEET</RaceType>
<CreationTimeDate>RACE_CREATION_TIME</CreationTimeDate>
<RaceStartTime Postpone="false" Time="RACE_START_TIME"/>
<Participants>
<Yacht SourceID="124"/>
<Yacht SourceID="125"/>
<Yacht SourceID="126"/>
</Participants>
<CompoundMarkSequence>
<Corner SeqID="1" CompoundMarkID="1" Rounding="SP" ZoneSize="3" />
<Corner SeqID="2" CompoundMarkID="2" Rounding="Port" ZoneSize="3" />
<Corner SeqID="3" CompoundMarkID="4" Rounding="Port" ZoneSize="3" />
<Corner SeqID="4" CompoundMarkID="3" Rounding="Starboard" ZoneSize="3" />
<Corner SeqID="5" CompoundMarkID="4" Rounding="Port" ZoneSize="3" />
<Corner SeqID="6" CompoundMarkID="5" Rounding="SP" ZoneSize="3"/>
</CompoundMarkSequence>
<Course>
<CompoundMark CompoundMarkID="1" Name="Start Line">
<Mark SeqId="1" Name="PRO" TargetLat="32.296577" TargetLng="-64.854304" SourceID="101"/>
<Mark SeqId="2" Name="PIN" TargetLat="32.293771" TargetLng="-64.855242" SourceID="102"/>
</CompoundMark>
<CompoundMark CompoundMarkID="2" Name="Marker 1">
<Mark Name="Marker1" TargetLat="32.293039" TargetLng="-64.843983" SourceID="103"/>
</CompoundMark>
<CompoundMark CompoundMarkID="3" Name="Windward Gate">
<Mark Name="WGL" SeqId="1" TargetLat="32.28468" TargetLng="-64.850045" SourceID="104"/>
<Mark Name="WGR" SeqId="2" TargetLat="32.280164" TargetLng="-64.847591" SourceID="105"/>
</CompoundMark>
<CompoundMark CompoundMarkID="4" Name="Leeward Gate">
<Mark Name="LGL" SeqId="1" TargetLat="32.309693" TargetLng="-64.835249" SourceID="106"/>
<Mark Name="LGR" SeqId="2" TargetLat="32.308046" TargetLng="-64.831785" SourceID="107"/>
</CompoundMark>
<CompoundMark CompoundMarkID="5" Name="Finish Line">
<Mark Name="FL" SeqId="1" TargetLat="32.317379" TargetLng="-64.839291" SourceID="108"/>
<Mark Name="FR" SeqId="2" TargetLat="32.317257" TargetLng="-64.83626" SourceID="109"/>
</CompoundMark>
</Course>
<CourseLimit>
<Limit Lat="32.313922" Lon="-64.837168" SeqID="1"/>
<Limit Lat="32.317379" Lon="-64.839291" SeqID="2"/>
<Limit Lat="32.317911" Lon="-64.836996" SeqID="3"/>
<Limit Lat="32.317257" Lon="-64.83626" SeqID="4"/>
<Limit Lat="32.304273" Lon="-64.822834" SeqID="5"/>
<Limit Lat="32.279097" Lon="-64.841545" SeqID="6"/>
<Limit Lat="32.279604" Lon="-64.849871" SeqID="7"/>
<Limit Lat="32.289545" Lon="-64.854162" SeqID="8"/>
<Limit Lat="32.290198" Lon="-64.858711" SeqID="9"/>
<Limit Lat="32.297164" Lon="-64.856394" SeqID="10"/>
<Limit Lat="32.296148" Lon="-64.849184" SeqID="11"/>
</CourseLimit>
</Race>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

@ -1,44 +1,61 @@
<!--<?xml version="1.0" encoding="UTF-8"?>--> <?xml version="1.0" encoding="UTF-8"?>
<!--<?import java.lang.*?>--> <?import java.lang.*?>
<!--<?import javafx.scene.control.*?>--> <?import javafx.geometry.*?>
<!--<?import javafx.scene.text.*?>--> <?import javafx.scene.control.*?>
<!--<?import javafx.scene.control.Button?>--> <?import javafx.scene.image.*?>
<!--<?import javafx.scene.control.Label?>--> <?import javafx.scene.layout.*?>
<!--<?import javafx.scene.layout.*?>--> <?import javafx.scene.text.*?>
<!--<?import javafx.scene.text.Font?>--> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?>
<!--<AnchorPane fx:id="hostWrapper" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="780.0" visible="false" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">--> <AnchorPane fx:id="hostWrapper" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="780.0" visible="false" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.HostController">
<!--<children>--> <children>
<!--<GridPane AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">--> <GridPane layoutY="14.0" AnchorPane.bottomAnchor="-14.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="14.0">
<!--<columnConstraints>--> <columnConstraints>
<!--<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />--> <ColumnConstraints hgrow="SOMETIMES" maxWidth="170.0" minWidth="10.0" prefWidth="170.0" />
<!--<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />--> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<!--<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />--> <ColumnConstraints hgrow="SOMETIMES" maxWidth="170.0" minWidth="10.0" prefWidth="170.0" />
<!--</columnConstraints>--> </columnConstraints>
<!--<rowConstraints>--> <rowConstraints>
<!--<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />--> <RowConstraints maxHeight="60.0" minHeight="60.0" prefHeight="30.0" vgrow="SOMETIMES" />
<!--<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />--> <RowConstraints minHeight="10.0" prefHeight="435.0" vgrow="SOMETIMES" />
<!--<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />--> <RowConstraints maxHeight="80.0" minHeight="80.0" prefHeight="80.0" vgrow="SOMETIMES" />
<!--</rowConstraints>--> </rowConstraints>
<!--<children>--> <children>
<!--<Button fx:id="hostGameBtn" mnemonicParsing="false" onAction="#hostGamePressed" text="Start Game" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2">--> <Button fx:id="hostGameBtn" mnemonicParsing="false" onAction="#hostGamePressed" text="Start Game" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<!--<font>--> <font>
<!--<Font size="20.0" />--> <Font size="20.0" />
<!--</font>--> </font>
<!--</Button>--> <GridPane.margin>
<!--<Label text="Address: 127.0.0.1" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="TOP">--> <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
<!--<font>--> </GridPane.margin>
<!--<Font size="17.0" />--> </Button>
<!--</font>--> <Label text="Address: 127.0.0.1" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="TOP">
<!--</Label>--> <font>
<!--<Label text="Port: 4942" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1">--> <Font size="17.0" />
<!--<font>--> </font>
<!--<Font size="17.0" />--> </Label>
<!--</font>--> <Label text="Port: 4942" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="BOTTOM">
<!--</Label>--> <font>
<!--<Button mnemonicParsing="false" onAction="#menuBtnPressed" text="Main Menu" GridPane.halignment="CENTER" />--> <Font size="17.0" />
<!--</children>--> </font>
<!--</GridPane>--> </Label>
<!--</children>--> <Button mnemonicParsing="false" onAction="#menuBtnPressed" text="Main Menu" GridPane.halignment="LEFT" GridPane.valignment="TOP">
<!--</AnchorPane>--> <GridPane.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</GridPane.margin></Button>
<ImageView fx:id="mapImage" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.hgrow="ALWAYS" GridPane.rowIndex="1" GridPane.valignment="CENTER" GridPane.vgrow="ALWAYS" />
<Button fx:id="previousButton" maxHeight="80.0" maxWidth="80.0" mnemonicParsing="false" onAction="#previousImage" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" />
<Button fx:id="nextButton" maxHeight="80.0" maxWidth="80.0" mnemonicParsing="false" onAction="#nextImage" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" />
</children>
</GridPane>
</children>
</AnchorPane>

@ -1,89 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.SplitPane?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?>
<AnchorPane fx:id="hostWrapper" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="780.0" visible="false" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.HostController">
<children>
<SplitPane fx:id="splitPane" dividerPositions="0.7724935732647815" layoutX="580.0" layoutY="129.0" prefHeight="160.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<items>
<AnchorPane fx:id="imagePane" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
<children>
<ImageView fx:id="imageView" fitHeight="376.0" fitWidth="597.0" nodeOrientation="INHERIT" pickOnBounds="true" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<image>
<Image url="@../images/lobby.gif" />
</image></ImageView>
<GridPane style="-fx-background-color: rgba(0, 0, 0, 0.5);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="50.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="1.7976931348623157E308" minHeight="10.0" prefHeight="173.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="50.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Button mnemonicParsing="false" onAction="#menuBtnPressed" text="Quit" GridPane.rowIndex="2">
<GridPane.margin>
<Insets left="20.0" />
</GridPane.margin>
</Button>
<Button alignment="CENTER_RIGHT" contentDisplay="RIGHT" mnemonicParsing="false" onAction="#startBtnPressed" text="Start Game" GridPane.columnIndex="2" GridPane.halignment="RIGHT" GridPane.rowIndex="2">
<GridPane.margin>
<Insets right="20.0" />
</GridPane.margin>
</Button>
<Label alignment="CENTER" contentDisplay="CENTER" text="Map: MapNameHere" textFill="WHITE" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2">
<font>
<Font size="16.0" />
</font>
</Label>
<GridPane fx:id="playerContainer" GridPane.columnSpan="3" GridPane.rowIndex="1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
</GridPane>
</children>
</GridPane>
<Label alignment="TOP_CENTER" text="Get Ready For The Next Race" textFill="#fffdfd" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="20.0">
<font>
<Font size="22.0" />
</font>
</Label>
</children>
</AnchorPane>
<AnchorPane fx:id="specPane" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
<children>
<TableView prefHeight="200.0" prefWidth="200.0" style="-fx-background-color: rgba(60, 60, 60, 1);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columns>
<TableColumn prefWidth="173.0" text="Spectators" />
</columns>
<columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy>
</TableView>
</children>
</AnchorPane>
</items>
</SplitPane>
</children>
</AnchorPane>

@ -7,7 +7,7 @@
<fx:include fx:id="start" source="start.fxml" /> <fx:include fx:id="start" source="start.fxml" />
<fx:include fx:id="connection" source="connect.fxml" /> <fx:include fx:id="connection" source="connect.fxml" />
<fx:include fx:id="finish" source="finish.fxml" /> <fx:include fx:id="finish" source="finish.fxml" />
<fx:include fx:id="host" source="hostlobby.fxml" /> <fx:include fx:id="host" source="hostgame.fxml" />
<fx:include fx:id="title" source="titleScreen.fxml" /> <fx:include fx:id="title" source="titleScreen.fxml" />
<fx:include fx:id="lobby" source="lobby.fxml" /> <fx:include fx:id="lobby" source="lobby.fxml" />
</children> </children>

Loading…
Cancel
Save