# Conflicts: # racevisionGame/src/main/java/shared/model/Constants.java # racevisionGame/src/main/java/visualiser/Controllers/HostController.java # racevisionGame/src/main/resources/visualiser/scenes/hostgame.fxmlmain
@ -0,0 +1,66 @@
|
|||||||
|
package visualiser.enums;
|
||||||
|
|
||||||
|
import javafx.scene.input.KeyCode;
|
||||||
|
import network.Messages.BoatAction;
|
||||||
|
import network.Messages.Enums.BoatActionEnum;
|
||||||
|
import visualiser.gameController.Keys.ControlKey;
|
||||||
|
import static visualiser.app.App.keyFactory;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* State of which stage the tutorial is currently in
|
||||||
|
*/
|
||||||
|
public enum TutorialState {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* State for upwind in tutorial
|
||||||
|
*/
|
||||||
|
UPWIND(BoatActionEnum.UPWIND),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* State for downwind in tutorial
|
||||||
|
*/
|
||||||
|
DOWNWIND(BoatActionEnum.DOWNWIND),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* State for tacking/gybing in tutorial
|
||||||
|
*/
|
||||||
|
TACKGYBE(BoatActionEnum.TACK_GYBE),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* State for vmg in tutorial
|
||||||
|
*/
|
||||||
|
VMG(BoatActionEnum.AUTO_PILOT),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* State for sails-in in tutorial
|
||||||
|
*/
|
||||||
|
SAILSIN(BoatActionEnum.SAILS_IN),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* State for sails-out in tutorial
|
||||||
|
*/
|
||||||
|
SAILSOUT(BoatActionEnum.SAILS_OUT),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* State for zoom-in in tutorial
|
||||||
|
*/
|
||||||
|
ZOOMIN(null),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* State for zoom-out in tutorial
|
||||||
|
*/
|
||||||
|
ZOOMOUT(null);
|
||||||
|
|
||||||
|
private BoatActionEnum action;
|
||||||
|
|
||||||
|
TutorialState(BoatActionEnum action){
|
||||||
|
this.action = action;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BoatActionEnum getAction(){
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 2.7 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 13 KiB |
@ -0,0 +1,41 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
|
||||||
|
<BoatConfig>
|
||||||
|
<Boats>
|
||||||
|
|
||||||
|
<!--Mark Boats-->
|
||||||
|
<Boat Type="Mark" BoatName="PRO" SourceID="101" >
|
||||||
|
<GPSposition X= "-64.854304" Y="32.296577" Z="0"/>
|
||||||
|
</Boat>
|
||||||
|
<Boat Type="Mark" BoatName="PIN" SourceID="102" >
|
||||||
|
<GPSposition X= "-64.855242" Y="32.293771" Z="0"/>
|
||||||
|
</Boat>
|
||||||
|
<Boat Type="Mark" BoatName="FL" SourceID="108" >
|
||||||
|
<GPSposition X= "-64.839291" Y="32.317379" Z="0"/>
|
||||||
|
</Boat>
|
||||||
|
<Boat Type="Mark" BoatName="FR" SourceID="109" >
|
||||||
|
<GPSposition X= "-64.83626" Y="32.317257" Z="0"/>
|
||||||
|
</Boat>
|
||||||
|
|
||||||
|
<!--Participants-->
|
||||||
|
<!--Participants-->
|
||||||
|
<Boat BoatName="Emirates Team New Zealand" HullNum="RG01" ShapeID="0" ShortName="NZL" SourceID="121" StoweName="NZL" Type="Yacht">
|
||||||
|
<GPSposition X="-64.854304" Y="32.296577" Z="0"/>
|
||||||
|
</Boat>
|
||||||
|
<!--<Boat BoatName="Land Rover BAR" HullNum="RG01" ShapeID="0" ShortName="GBR" SourceID="122" StoweName="GBR" Type="Yacht">
|
||||||
|
<GPSposition X="-64.854304" Y="32.296577" Z="0"/>
|
||||||
|
</Boat>
|
||||||
|
<Boat BoatName="SoftBank Team Japan" HullNum="RG01" ShapeID="0" ShortName="JPN" SourceID="123" StoweName="JPN" Type="Yacht">
|
||||||
|
<GPSposition X="-64.854304" Y="32.296577" Z="0"/>
|
||||||
|
</Boat>
|
||||||
|
<Boat BoatName="Groupama Team France" HullNum="RG01" ShapeID="0" ShortName="FRA" SourceID="124" StoweName="FRA" Type="Yacht">
|
||||||
|
<GPSposition X="-64.854304" Y="32.296577" Z="0"/>
|
||||||
|
</Boat>
|
||||||
|
<Boat BoatName="Artemis Racing" HullNum="RG01" ShapeID="0" ShortName="SWE" SourceID="125" StoweName="SWE" Type="Yacht">
|
||||||
|
<GPSposition X="-64.854304" Y="32.296577" Z="0"/>
|
||||||
|
</Boat>
|
||||||
|
<Boat BoatName="ORACLE TEAM USA" HullNum="RG01" ShapeID="0" ShortName="USA" SourceID="126" StoweName="USA" Type="Yacht">
|
||||||
|
<GPSposition X="-64.854304" Y="32.296577" Z="0"/>
|
||||||
|
</Boat>-->
|
||||||
|
</Boats>
|
||||||
|
</BoatConfig>
|
||||||
@ -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>
|
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<Race>
|
||||||
|
<RaceID>9999</RaceID>
|
||||||
|
<RaceType>FLEET</RaceType>
|
||||||
|
<CreationTimeDate>RACE_CREATION_TIME</CreationTimeDate>
|
||||||
|
<RaceStartTime Postpone="false" Time="RACE_START_TIME"/>
|
||||||
|
<Participants>
|
||||||
|
<!--<Yacht SourceID="121"/>-->
|
||||||
|
</Participants>
|
||||||
|
<CompoundMarkSequence>
|
||||||
|
<Corner SeqID="1" CompoundMarkID="1" Rounding="SP" ZoneSize="3" />
|
||||||
|
<Corner SeqID="2" CompoundMarkID="2" Rounding="SP" ZoneSize="3"/>
|
||||||
|
</CompoundMarkSequence>
|
||||||
|
<Course>
|
||||||
|
<CompoundMark CompoundMarkID="1" Name="Start Line">
|
||||||
|
<Mark SeqId="1" Name="PRO" TargetLat="32.288148" TargetLng="-64.852996" SourceID="101"/>
|
||||||
|
<Mark SeqId="2" Name="PIN" TargetLat="32.290148" TargetLng="-64.854996" SourceID="102"/>
|
||||||
|
</CompoundMark>
|
||||||
|
<CompoundMark CompoundMarkID="2" Name="Finish Line">
|
||||||
|
<Mark Name="FL" SeqId="1" TargetLat="42.315911" TargetLng="-64.846996" SourceID="108"/>
|
||||||
|
<Mark Name="FR" SeqId="2" TargetLat="42.315911" TargetLng="-64.848996" SourceID="109"/>
|
||||||
|
</CompoundMark>
|
||||||
|
</Course>
|
||||||
|
<CourseLimit>
|
||||||
|
|
||||||
|
<Limit Lat="32.317911" Lon="-64.836996" SeqID="1"/>
|
||||||
|
<Limit Lat="32.286148" Lon="-64.836996" SeqID="2"/>
|
||||||
|
<Limit Lat="32.286148" Lon="-64.856996" SeqID="3"/>
|
||||||
|
<Limit Lat="32.317911" Lon="-64.856996" SeqID="4"/>
|
||||||
|
|
||||||
|
<!--<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>
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
<RegattaConfig>
|
||||||
|
<RegattaID>0</RegattaID>
|
||||||
|
<RegattaName>Race Tutorial</RegattaName>
|
||||||
|
<CourseName>Tutorial</CourseName>
|
||||||
|
<CentralLatitude>-36.82791529</CentralLatitude>
|
||||||
|
<CentralLongitude>174.81218919</CentralLongitude>
|
||||||
|
<CentralAltitude>0.00</CentralAltitude>
|
||||||
|
<UtcOffset>12</UtcOffset>
|
||||||
|
<MagneticVariation>14.1</MagneticVariation>
|
||||||
|
</RegattaConfig>
|
||||||
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 665 KiB |
@ -0,0 +1,91 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<Race>
|
||||||
|
|
||||||
|
<RaceID>99999999</RaceID>
|
||||||
|
|
||||||
|
<RaceType>Match</RaceType>
|
||||||
|
|
||||||
|
<CreationTimeDate>2011-08-06T13:25:00-0000</CreationTimeDate>
|
||||||
|
|
||||||
|
<RaceStartTime Time="2011-08-06T13:30:00-0700" Postpone="false"/>
|
||||||
|
|
||||||
|
<Participants>
|
||||||
|
|
||||||
|
<Yacht SourceID="101" Entry="Port"/>
|
||||||
|
|
||||||
|
<Yacht SourceID="108" Entry="Stbd"/>
|
||||||
|
|
||||||
|
</Participants>
|
||||||
|
|
||||||
|
<Course>
|
||||||
|
|
||||||
|
<CompoundMark CompoundMarkID="1" Name="StartLine">
|
||||||
|
|
||||||
|
<Mark SeqID="1" Name="PRO" TargetLat="-36.83" TargetLng="174.83" SourceID="101"/>
|
||||||
|
|
||||||
|
<Mark SeqID="2" Name="PIN" TargetLat="-36.84" TargetLng="174.81" SourceID="102"/>
|
||||||
|
|
||||||
|
</CompoundMark>
|
||||||
|
|
||||||
|
<CompoundMark CompoundMarkID="2" Name="M1">
|
||||||
|
|
||||||
|
<Mark Name="M1" TargetLat="-36.63566590" TargetLng="174.88543944" SourceID="103"/>
|
||||||
|
|
||||||
|
</CompoundMark>
|
||||||
|
|
||||||
|
<CompoundMark CompoundMarkID="3" Name="M2">
|
||||||
|
|
||||||
|
<Mark Name="M2" TargetLat="-36.83" TargetLng="174.80" SourceID="102"/>
|
||||||
|
|
||||||
|
</CompoundMark>
|
||||||
|
|
||||||
|
<CompoundMark CompoundMarkID="4" Name="Gate">
|
||||||
|
|
||||||
|
<Mark SeqID="1" Name="G1" TargetLat="-36.63566590" TargetLng="174.97205159" SourceID="104"/>
|
||||||
|
|
||||||
|
<Mark SeqID="2" Name="G2" TargetLat="-36.64566590" TargetLng="174.98205159" SourceID="105"/>
|
||||||
|
|
||||||
|
</CompoundMark>
|
||||||
|
|
||||||
|
</Course>
|
||||||
|
|
||||||
|
<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="Stbd" ZoneSize="6"/>
|
||||||
|
|
||||||
|
<Corner SeqID="4" CompoundMarkID="4" Rounding="PS" ZoneSize="6"/>
|
||||||
|
|
||||||
|
<Corner SeqID="5" CompoundMarkID="1" Rounding="SP" ZoneSize="3"/>
|
||||||
|
|
||||||
|
</CompoundMarkSequence>
|
||||||
|
|
||||||
|
<CourseLimit>
|
||||||
|
|
||||||
|
<Limit SeqID="1" Lat="-36.8325" Lon="174.8325"/>
|
||||||
|
|
||||||
|
<Limit SeqID="2" Lat="-36.82883" Lon="174.81983"/>
|
||||||
|
|
||||||
|
<Limit SeqID="3" Lat="-36.82067" Lon="174.81983"/>
|
||||||
|
|
||||||
|
<Limit SeqID="4" Lat="-36.811" Lon="174.8265"/>
|
||||||
|
|
||||||
|
<Limit SeqID="5" Lat="-36.81033" Lon="174.83833"/>
|
||||||
|
|
||||||
|
<Limit SeqID="6" Lat="-36.81533" Lon="174.8525"/>
|
||||||
|
|
||||||
|
<Limit SeqID="7" Lat="-36.81533" Lon="174.86733"/>
|
||||||
|
|
||||||
|
<Limit SeqID="8" Lat="-36.81633" Lon="174.88217"/>
|
||||||
|
|
||||||
|
<Limit SeqID="9" Lat="-36.83383" Lon="174.87117"/>
|
||||||
|
|
||||||
|
<Limit SeqID="10" Lat="-36.83417" Lon="174.84767"/>
|
||||||
|
|
||||||
|
</CourseLimit>
|
||||||
|
|
||||||
|
</Race>
|
||||||
@ -1,40 +1,61 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import java.lang.*?>
|
||||||
|
<?import javafx.geometry.*?>
|
||||||
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import javafx.scene.image.*?>
|
||||||
|
<?import javafx.scene.layout.*?>
|
||||||
|
<?import javafx.scene.text.*?>
|
||||||
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.layout.*?>
|
<?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?>
|
<?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" fx:controller="visualiser.Controllers.HostController">
|
<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>
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
//package seng302.Mock;
|
|
||||||
//
|
|
||||||
//import org.junit.Before;
|
|
||||||
//import org.junit.Test;
|
|
||||||
//
|
|
||||||
//import java.util.HashMap;
|
|
||||||
//import java.util.Map;
|
|
||||||
//
|
|
||||||
//import static org.junit.Assert.assertEquals;
|
|
||||||
//
|
|
||||||
///**
|
|
||||||
// * Created by jjg64 on 21/04/17.
|
|
||||||
// */
|
|
||||||
//public class BoatsXMLTest {
|
|
||||||
// private BoatXMLReader boatXMLReader;
|
|
||||||
//
|
|
||||||
// @Before
|
|
||||||
// public void setup() {
|
|
||||||
// try {
|
|
||||||
// boatXMLReader = new BoatXMLReader("mockXML/boatXML/boatTest.xml", false);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// //fail("Cannot find mockXML/raceXML/raceTest.xml in the resources folder");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void testInvalidParticipant() {
|
|
||||||
// Map<Integer, StreamedBoat> inputParticipants = new HashMap<>();
|
|
||||||
// inputParticipants.put(420, new StreamedBoat(420));
|
|
||||||
// boatXMLReader.setParticipants(inputParticipants);
|
|
||||||
// boatXMLReader.read();
|
|
||||||
// assertEquals(boatXMLReader.getBoats().size(), 0);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void testValidParticipant() {
|
|
||||||
// Map<Integer, StreamedBoat> inputParticipants = new HashMap<>();
|
|
||||||
// inputParticipants.put(101, new StreamedBoat(101));
|
|
||||||
// boatXMLReader.setParticipants(inputParticipants);
|
|
||||||
// boatXMLReader.read();
|
|
||||||
// assertEquals(boatXMLReader.getBoats().size(), 1);
|
|
||||||
// StreamedBoat boat = (StreamedBoat) boatXMLReader.getBoats().get(0);
|
|
||||||
// assertEquals(boat.getSourceID(), 101);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
//package seng302.Mock;
|
|
||||||
//
|
|
||||||
//import org.junit.Test;
|
|
||||||
//import org.xml.sax.SAXException;
|
|
||||||
//
|
|
||||||
//import javax.xml.parsers.ParserConfigurationException;
|
|
||||||
//import java.io.IOException;
|
|
||||||
//import java.text.ParseException;
|
|
||||||
//
|
|
||||||
///**
|
|
||||||
// * Created by jjg64 on 1/05/17.
|
|
||||||
// */
|
|
||||||
//public class FailBoatXMLTest {
|
|
||||||
// private final String path = "mockXML/boatXML/";
|
|
||||||
//
|
|
||||||
// @Test(expected = NumberFormatException.class)
|
|
||||||
// public void invalidSourceID() throws SAXException, ParserConfigurationException, ParseException, IOException {
|
|
||||||
// new BoatXMLReader(path + "invalidSourceID.xml");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test(expected = NullPointerException.class)
|
|
||||||
// public void insufficientInformation() throws SAXException, ParserConfigurationException, ParseException, IOException {
|
|
||||||
// new BoatXMLReader(path + "insufficientInformation.xml");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
||||||
@ -1,345 +0,0 @@
|
|||||||
//package shared.model;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//import mock.model.Polars;
|
|
||||||
//import org.junit.Before;
|
|
||||||
//import org.junit.Ignore;
|
|
||||||
//import org.junit.Test;
|
|
||||||
//import org.mockito.Mockito;
|
|
||||||
//import org.xml.sax.SAXException;
|
|
||||||
//
|
|
||||||
//import javax.xml.parsers.ParserConfigurationException;
|
|
||||||
//import java.io.IOException;
|
|
||||||
//import java.text.ParseException;
|
|
||||||
//import java.util.ArrayList;
|
|
||||||
//
|
|
||||||
//import static org.junit.Assert.*;
|
|
||||||
//import static org.mockito.Mockito.*;
|
|
||||||
//
|
|
||||||
///**
|
|
||||||
// * Created by esa46 on 15/03/17.
|
|
||||||
// */
|
|
||||||
//public class RaceTest{
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// private CompoundMark ORIGIN;
|
|
||||||
//
|
|
||||||
// private CompoundMark THREE_NM_FROM_ORIGIN;
|
|
||||||
//
|
|
||||||
// private CompoundMark FIFTEEN_NM_FROM_ORIGIN;
|
|
||||||
//
|
|
||||||
// private ArrayList<Leg> TEST_LEGS = new ArrayList<>();
|
|
||||||
//
|
|
||||||
// private int START_LEG_DISTANCE = 3;
|
|
||||||
// private int MIDDLE_LEG_DISTANCE = 12;
|
|
||||||
//
|
|
||||||
// private Leg START_LEG;
|
|
||||||
//
|
|
||||||
// private Leg MIDDLE_LEG;
|
|
||||||
//
|
|
||||||
// private Leg FINISH_LEG;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// @Before
|
|
||||||
// public void setUp() {
|
|
||||||
//
|
|
||||||
// ORIGIN = new CompoundMark(
|
|
||||||
// 1,
|
|
||||||
// "origin compound",
|
|
||||||
// new Mark(1, "test origin 1", new GPSCoordinate(0, 0)) );
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// THREE_NM_FROM_ORIGIN = new CompoundMark(
|
|
||||||
// 2,
|
|
||||||
// "3 NM from origin compound",
|
|
||||||
// new Mark(2, "test mark 2", new GPSCoordinate(0.050246769, 0)) );
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// FIFTEEN_NM_FROM_ORIGIN = new CompoundMark(
|
|
||||||
// 3,
|
|
||||||
// "15 NM from origin compound",
|
|
||||||
// new Mark(3, "test mark 3", new GPSCoordinate(0.251233845, 0)) );
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// START_LEG = new Leg("Start", ORIGIN, THREE_NM_FROM_ORIGIN, 0);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// MIDDLE_LEG = new Leg("Middle", THREE_NM_FROM_ORIGIN, FIFTEEN_NM_FROM_ORIGIN, 1);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// FINISH_LEG = new Leg("Finish", FIFTEEN_NM_FROM_ORIGIN, FIFTEEN_NM_FROM_ORIGIN, 2);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// TEST_LEGS.add(START_LEG);
|
|
||||||
// TEST_LEGS.add(MIDDLE_LEG);
|
|
||||||
// TEST_LEGS.add(FINISH_LEG);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Ignore
|
|
||||||
// @Test
|
|
||||||
// public void countdownTimerSendsBoatLocations() {
|
|
||||||
//
|
|
||||||
// try {
|
|
||||||
// MockOutput mockOutput = Mockito.mock(MockOutput.class);
|
|
||||||
// BoatDataSource boatDataSource = new BoatXMLReader("mockXML/boatTest.xml", new Polars());
|
|
||||||
// RaceDataSource raceDataSource = new RaceXMLReader("mockXML/raceTest.xml", boatDataSource);
|
|
||||||
// Race testRace = new Race(raceDataSource, mockOutput);
|
|
||||||
// testRace.initialiseBoats();
|
|
||||||
// testRace.countdownTimer.handle(1);
|
|
||||||
// verify(mockOutput, atLeast(boatDataSource.getBoats().size())).parseBoatLocation(anyInt(), anyDouble(), anyDouble(), anyDouble(), anyDouble(), anyLong());
|
|
||||||
//
|
|
||||||
// } catch (ParserConfigurationException | IOException | SAXException | ParseException | StreamedCourseXMLException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// fail();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Ignore
|
|
||||||
// @Test
|
|
||||||
// public void countdownTimerSendsRaceStatusMessages() {
|
|
||||||
//
|
|
||||||
// try {
|
|
||||||
// MockOutput mockOutput = Mockito.mock(MockOutput.class);
|
|
||||||
// RaceDataSource dataSource = new RaceXMLReader("mockXML/raceTest.xml", new BoatXMLReader("mockXML/boatTest.xml", new Polars()));
|
|
||||||
// Race testRace = new Race(dataSource, mockOutput);
|
|
||||||
// testRace.initialiseBoats();
|
|
||||||
// testRace.countdownTimer.handle(1);
|
|
||||||
// verify(mockOutput, atLeast(1)).parseRaceStatus(any());
|
|
||||||
//
|
|
||||||
// } catch (ParserConfigurationException | IOException | SAXException | ParseException | StreamedCourseXMLException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// fail();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Ignore
|
|
||||||
// @Test
|
|
||||||
// public void checkPositionFinishedUpdatesNumberFinishedBoats() {
|
|
||||||
//
|
|
||||||
// try {
|
|
||||||
// MockOutput mockOutput = Mockito.mock(MockOutput.class);
|
|
||||||
// RaceDataSource dataSource = new RaceXMLReader("mockXML/raceTest.xml", new BoatXMLReader("mockXML/boatTest.xml", new Polars()));
|
|
||||||
// Race testRace = new Race(dataSource, mockOutput);
|
|
||||||
// testRace.initialiseBoats();
|
|
||||||
// Boat testBoat = testRace.getBoats().get(0);
|
|
||||||
// testBoat.setCurrentLeg(FINISH_LEG);
|
|
||||||
// testBoat.setDistanceTravelledInLeg(1);
|
|
||||||
// testRace.checkPosition(testBoat, 1);
|
|
||||||
//
|
|
||||||
// assertEquals(testRace.getNumberOfActiveBoats(), 0);
|
|
||||||
//
|
|
||||||
// } catch (ParserConfigurationException | IOException | SAXException | ParseException | StreamedCourseXMLException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// fail();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Ignore
|
|
||||||
// @Test
|
|
||||||
// public void checkPositionSetFinishedBoatVelocityTo0() {
|
|
||||||
//
|
|
||||||
// try {
|
|
||||||
// MockOutput mockOutput = Mockito.mock(MockOutput.class);
|
|
||||||
// RaceDataSource dataSource = new RaceXMLReader("mockXML/raceTest.xml", new BoatXMLReader("mockXML/boatTest.xml", new Polars()));
|
|
||||||
// Race testRace = new Race(dataSource, mockOutput);
|
|
||||||
// testRace.initialiseBoats();
|
|
||||||
// Boat testBoat = testRace.getBoats().get(0);
|
|
||||||
// testBoat.setCurrentLeg(FINISH_LEG);
|
|
||||||
// testBoat.setDistanceTravelledInLeg(1);
|
|
||||||
// testRace.checkPosition(testBoat, 1);
|
|
||||||
//
|
|
||||||
// assertEquals(testBoat.getCurrentSpeed(), 0, 1e-8);
|
|
||||||
//
|
|
||||||
// } catch (ParserConfigurationException | IOException | SAXException | ParseException | StreamedCourseXMLException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// fail();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Ignore
|
|
||||||
// @Test
|
|
||||||
// public void checkPositionSetsFinishTime() {
|
|
||||||
//
|
|
||||||
// try {
|
|
||||||
// MockOutput mockOutput = Mockito.mock(MockOutput.class);
|
|
||||||
// RaceDataSource dataSource = new RaceXMLReader("mockXML/raceTest.xml", new BoatXMLReader("mockXML/boatTest.xml", new Polars()));
|
|
||||||
// Race testRace = new Race(dataSource, mockOutput);
|
|
||||||
// testRace.initialiseBoats();
|
|
||||||
// Boat testBoat = testRace.getBoats().get(0);
|
|
||||||
// testBoat.setCurrentLeg(FINISH_LEG);
|
|
||||||
// testBoat.setDistanceTravelledInLeg(1);
|
|
||||||
// testRace.checkPosition(testBoat, 1);
|
|
||||||
//
|
|
||||||
// assertEquals(testBoat.getTimeFinished(), 1, 1e-8);
|
|
||||||
//
|
|
||||||
// } catch (ParserConfigurationException | IOException | SAXException | ParseException | StreamedCourseXMLException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// fail();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Ignore
|
|
||||||
// @Test
|
|
||||||
// public void checkPositionUnfinishedDoesntUpdateNumberFinishedBoats() {
|
|
||||||
//
|
|
||||||
// try {
|
|
||||||
// MockOutput mockOutput = Mockito.mock(MockOutput.class);
|
|
||||||
// RaceDataSource dataSource = new RaceXMLReader("mockXML/raceTest.xml", new BoatXMLReader("mockXML/boatTest.xml", new Polars()));
|
|
||||||
// Race testRace = new Race(dataSource, mockOutput);
|
|
||||||
// testRace.initialiseBoats();
|
|
||||||
// Boat testBoat = testRace.getBoats().get(0);
|
|
||||||
// testBoat.setCurrentLeg(START_LEG);
|
|
||||||
// testBoat.setDistanceTravelledInLeg(START_LEG_DISTANCE);
|
|
||||||
// testRace.checkPosition(testBoat, 1);
|
|
||||||
//
|
|
||||||
// assertEquals(testRace.getNumberOfActiveBoats(), 1);
|
|
||||||
//
|
|
||||||
// } catch (ParserConfigurationException | IOException | SAXException | ParseException | StreamedCourseXMLException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// fail();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// @Ignore
|
|
||||||
// @Test
|
|
||||||
// public void distanceTravelledBeforeUpdatingLegIsRetained() {
|
|
||||||
//
|
|
||||||
// try {
|
|
||||||
// MockOutput mockOutput = Mockito.mock(MockOutput.class);
|
|
||||||
// RaceDataSource dataSource = new RaceXMLReader("mockXML/raceTest.xml", new BoatXMLReader("mockXML/boatTest.xml", new Polars()));
|
|
||||||
// Race testRace = new Race(dataSource, mockOutput);
|
|
||||||
// testRace.initialiseBoats();
|
|
||||||
// Boat testBoat = testRace.getBoats().get(0);
|
|
||||||
// testBoat.setCurrentLeg(START_LEG);
|
|
||||||
// testBoat.setDistanceTravelledInLeg(START_LEG_DISTANCE + 1);
|
|
||||||
// testRace.checkPosition(testBoat, 0);
|
|
||||||
//
|
|
||||||
// assertEquals(testBoat.getDistanceTravelledInLeg(), 1, 1e-7);
|
|
||||||
//
|
|
||||||
// } catch (ParserConfigurationException | IOException | SAXException | ParseException | StreamedCourseXMLException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// fail();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Ignore
|
|
||||||
// @Test
|
|
||||||
// public void doNotFinishAnswersYesIf100PercentChance() {
|
|
||||||
//
|
|
||||||
// try {
|
|
||||||
// MockOutput mockOutput = Mockito.mock(MockOutput.class);
|
|
||||||
// BoatDataSource boatDataSource = new BoatXMLReader("mockXML/boatTest.xml", new Polars());
|
|
||||||
// RaceDataSource raceDataSource = new RaceXMLReader("mockXML/raceTest.xml", boatDataSource);
|
|
||||||
// Race testRace = new Race(raceDataSource, mockOutput);
|
|
||||||
//
|
|
||||||
// testRace.setDnfChance(100);
|
|
||||||
// assertTrue(testRace.doNotFinish());
|
|
||||||
//
|
|
||||||
// } catch (ParserConfigurationException | IOException | SAXException | ParseException | StreamedCourseXMLException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// fail();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Ignore
|
|
||||||
// @Test
|
|
||||||
// public void doNotFinishAnswersNoIf0PercentChance() {
|
|
||||||
//
|
|
||||||
// try {
|
|
||||||
// MockOutput mockOutput = Mockito.mock(MockOutput.class);
|
|
||||||
// BoatDataSource boatDataSource = new BoatXMLReader("mockXML/boatTest.xml", new Polars());
|
|
||||||
// RaceDataSource raceDataSource = new RaceXMLReader("mockXML/raceTest.xml", boatDataSource);
|
|
||||||
// Race testRace = new Race(raceDataSource, mockOutput);
|
|
||||||
// testRace.setDnfChance(0);
|
|
||||||
// assertFalse(testRace.doNotFinish());
|
|
||||||
//
|
|
||||||
// } catch (ParserConfigurationException | IOException | SAXException | ParseException | StreamedCourseXMLException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// fail();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Ignore
|
|
||||||
// @Test
|
|
||||||
// public void boatsAreSetToDNF() {
|
|
||||||
// try {
|
|
||||||
// MockOutput mockOutput = Mockito.mock(MockOutput.class);
|
|
||||||
// BoatDataSource boatDataSource = new BoatXMLReader("mockXML/boatTest.xml", new Polars());
|
|
||||||
// RaceDataSource raceDataSource = new RaceXMLReader("mockXML/raceTest.xml", boatDataSource);
|
|
||||||
// Race testRace = new Race(raceDataSource, mockOutput);
|
|
||||||
// testRace.setDnfChance(100);
|
|
||||||
// Boat testBoat = testRace.getBoats().get(0);
|
|
||||||
// testBoat.setCurrentLeg(START_LEG);
|
|
||||||
// testBoat.setDistanceTravelledInLeg(START_LEG_DISTANCE + 1);
|
|
||||||
// testRace.checkPosition(testBoat, 1);
|
|
||||||
// assertEquals(testBoat.getCurrentLeg().getName(), "DNF");
|
|
||||||
//
|
|
||||||
// } catch (ParserConfigurationException | IOException | SAXException | ParseException | StreamedCourseXMLException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// fail();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Ignore
|
|
||||||
// @Test
|
|
||||||
// public void updatePositionIgnoresFinishedBoats() {
|
|
||||||
// try {
|
|
||||||
// MockOutput mockOutput = Mockito.mock(MockOutput.class);
|
|
||||||
// BoatDataSource boatDataSource = new BoatXMLReader("mockXML/boatTest.xml", new Polars());
|
|
||||||
// RaceDataSource raceDataSource = new RaceXMLReader("mockXML/raceTest.xml", boatDataSource);
|
|
||||||
// Race testRace = new Race(raceDataSource, mockOutput);
|
|
||||||
// Boat testBoat = testRace.getBoats().get(0);
|
|
||||||
// testBoat.setCurrentLeg(FINISH_LEG);
|
|
||||||
// testBoat.setCurrentPosition(ORIGIN.getAverageGPSCoordinate());
|
|
||||||
// testRace.updatePosition(testBoat, 1, 1);
|
|
||||||
// assertEquals(testBoat.getCurrentPosition(), ORIGIN.getAverageGPSCoordinate());
|
|
||||||
//
|
|
||||||
// } catch (ParserConfigurationException | IOException | SAXException | ParseException | StreamedCourseXMLException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// fail();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Ignore
|
|
||||||
// @Test
|
|
||||||
// public void updatePositionChangesBoatPosition() {
|
|
||||||
// try {
|
|
||||||
// MockOutput mockOutput = Mockito.mock(MockOutput.class);
|
|
||||||
// BoatDataSource boatDataSource = new BoatXMLReader("mockXML/boatTest.xml", new Polars());
|
|
||||||
// RaceDataSource raceDataSource = new RaceXMLReader("mockXML/raceTest.xml", boatDataSource);
|
|
||||||
// Race testRace = new Race(raceDataSource, mockOutput);
|
|
||||||
// testRace.initialiseBoats();
|
|
||||||
// Boat testBoat = testRace.getBoats().get(0);
|
|
||||||
// testBoat.setCurrentLeg(START_LEG);
|
|
||||||
// testBoat.setDistanceTravelledInLeg(START_LEG_DISTANCE - 1);
|
|
||||||
// testBoat.setCurrentPosition(ORIGIN.getAverageGPSCoordinate());
|
|
||||||
// testRace.updatePosition(testBoat, 100, 100);
|
|
||||||
// assertFalse(testBoat.getCurrentPosition() == ORIGIN.getAverageGPSCoordinate());
|
|
||||||
// } catch (ParserConfigurationException | IOException | SAXException | ParseException | StreamedCourseXMLException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// fail();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Ignore
|
|
||||||
// @Test
|
|
||||||
// public void windDirectionCorrectValues(){
|
|
||||||
//// try {
|
|
||||||
//// MockOutput mockOutput = Mockito.mock(MockOutput.class);
|
|
||||||
//// BoatDataSource boatDataSource = new BoatXMLReader("mockXML/boatTest.xml");
|
|
||||||
//// RaceDataSource raceDataSource = new RaceXMLReader("mockXML/raceTest.xml", boatDataSource);
|
|
||||||
//// Race testRace = new Race(raceDataSource, mockOutput);
|
|
||||||
//// testRace.setChangeWind(1);
|
|
||||||
//// testRace.setWindDir(65535);
|
|
||||||
//// testRace.changeWindDir();
|
|
||||||
//// assertEquals(100, testRace.getWind());
|
|
||||||
//// } catch (ParserConfigurationException | IOException | SAXException | ParseException | StreamedCourseXMLException e) {
|
|
||||||
//// e.printStackTrace();
|
|
||||||
//// fail();
|
|
||||||
//// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//}
|
|
||||||
@ -1,100 +0,0 @@
|
|||||||
//package visualiser.model;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//import org.junit.Before;
|
|
||||||
//import org.junit.Test;
|
|
||||||
//import shared.dataInput.RaceXMLReader;
|
|
||||||
//import shared.dataInput.XMLReader;
|
|
||||||
//import shared.exceptions.InvalidRaceDataException;
|
|
||||||
//import shared.model.GPSCoordinate;
|
|
||||||
//
|
|
||||||
//import java.nio.charset.StandardCharsets;
|
|
||||||
//import java.util.List;
|
|
||||||
//
|
|
||||||
//import static org.junit.Assert.assertEquals;
|
|
||||||
//import static org.junit.Assert.fail;
|
|
||||||
//
|
|
||||||
///**
|
|
||||||
// * Tests only work on the current version of mockXML/raceXML/raceTest.xml
|
|
||||||
// */
|
|
||||||
//public class VisualiserRaceTest {
|
|
||||||
// private RaceXMLReader streamedCourseXMLReader;
|
|
||||||
// private List<GPSCoordinate> boundary;
|
|
||||||
//
|
|
||||||
// @Before
|
|
||||||
// public void setup() {
|
|
||||||
// try {
|
|
||||||
// streamedCourseXMLReader = new RaceXMLReader(XMLReader.readXMLFileToString("mockXML/raceXML/raceTest.xml", StandardCharsets.UTF_8));
|
|
||||||
// boundary = streamedCourseXMLReader.getBoundary();
|
|
||||||
// } catch (InvalidRaceDataException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// fail("Cannot find mockXML/raceXML/raceTest.xml in the resources folder");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void testAllBoundaryPointsRead() {
|
|
||||||
// assertEquals(boundary.size(), 10);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void testBoundaryPointData() {
|
|
||||||
// // First point
|
|
||||||
// assertEquals(boundary.get(0).getLatitude(), -36.8325, 1e-6);
|
|
||||||
// assertEquals(boundary.get(0).getLongitude(), 174.8325, 1e-6);
|
|
||||||
//
|
|
||||||
// // Last point
|
|
||||||
// assertEquals(boundary.get(boundary.size() - 1).getLatitude(), -36.83417, 1e-6);
|
|
||||||
// assertEquals(boundary.get(boundary.size() - 1).getLongitude(), 174.84767, 1e-6);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void testMapEdges() {
|
|
||||||
// double maxLatitude = streamedCourseXMLReader.getMapBottomRight().getLatitude() - streamedCourseXMLReader.getPadding();
|
|
||||||
// double maxLongitude = streamedCourseXMLReader.getMapBottomRight().getLongitude() - streamedCourseXMLReader.getPadding();
|
|
||||||
// double minLatitude = streamedCourseXMLReader.getMapTopLeft().getLatitude() - streamedCourseXMLReader.getPadding();
|
|
||||||
// double minLongitude = streamedCourseXMLReader.getMapTopLeft().getLongitude() - streamedCourseXMLReader.getPadding();
|
|
||||||
//
|
|
||||||
// assertEquals(maxLatitude, -36.81033, 1e-6);
|
|
||||||
// assertEquals(maxLongitude, 174.88217, 1e-6);
|
|
||||||
// assertEquals(minLatitude, -36.83417, 1e-6);
|
|
||||||
// assertEquals(minLongitude, 174.81983, 1e-6);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void testRaceSettings() {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// public void correctLegSequence() {
|
|
||||||
// List<Leg> legs = streamedCourseXMLReader.getLegs();
|
|
||||||
// String[] expectedNames = {
|
|
||||||
// "StartLine",
|
|
||||||
// "M1",
|
|
||||||
// "M2",
|
|
||||||
// "Gate"
|
|
||||||
// };
|
|
||||||
// for(int i = 0; i < legs.size(); i++) {
|
|
||||||
// assertEquals(expectedNames[i], legs.get(i).getName());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * raceTest.xml is not compliant with this test. Markers are positioned far out of bounds.
|
|
||||||
// */
|
|
||||||
// @Test
|
|
||||||
// @Ignore
|
|
||||||
// public void markersWithinRaceBoundaries() {
|
|
||||||
// GPSCoordinate topLeft = streamedCourseXMLReader.getMapTopLeft();
|
|
||||||
// GPSCoordinate bottomRight = streamedCourseXMLReader.getMapBottomRight();
|
|
||||||
//
|
|
||||||
// for(Marker compoundMark : streamedCourseXMLReader.getMarkers()) {
|
|
||||||
// GPSCoordinate centre = compoundMark.getAverageGPSCoordinate();
|
|
||||||
// assertTrue(centre.getLatitude() < bottomRight.getLatitude());
|
|
||||||
// assertTrue(centre.getLatitude() > topLeft.getLatitude());
|
|
||||||
// assertTrue(centre.getLongitude() > bottomRight.getLongitude());
|
|
||||||
// assertTrue(centre.getLongitude() < topLeft.getLongitude());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||