Updated maven version to 2.0.
Added a dedicatedServer module. Removed Visualiser module. Removed mock module. Removed network module. Fixed weird exception non-handling that appeared for some reason.
This commit is contained in:
@@ -79,7 +79,7 @@ public class Event {
|
||||
*/
|
||||
public Event(boolean singlePlayer) throws EventConstructionException {
|
||||
|
||||
String raceXMLFile = "mock/mockXML/raceThreePlayers.xml";//TEMP 3 player race - for demo on 18th august
|
||||
String raceXMLFile = "mock/mockXML/raceTest.xml";
|
||||
String boatsXMLFile = "mock/mockXML/boatTest.xml";
|
||||
String regattaXMLFile = "mock/mockXML/regattaTest.xml";
|
||||
|
||||
@@ -171,13 +171,6 @@ public class Event {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sends the initial race data and then begins race simulation.
|
||||
*/
|
||||
public void start() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends out each xml string, via the mock output
|
||||
|
||||
@@ -101,8 +101,6 @@ public class MockOutput implements RunnableWithFramePeriod {
|
||||
Logger.getGlobal().log(Level.WARNING, "MockOutput.run() interrupted while putting message in queue.", e);
|
||||
Thread.currentThread().interrupt();
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -92,11 +92,8 @@ public class HeartBeatService implements RunnableWithFramePeriod {
|
||||
|
||||
while (!Thread.interrupted()) {
|
||||
long currentFrameTime = System.currentTimeMillis();
|
||||
try {
|
||||
waitForFramePeriod(lastHeartbeatTime, currentFrameTime, heartbeatPeriod);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
waitForFramePeriod(lastHeartbeatTime, currentFrameTime, heartbeatPeriod);
|
||||
|
||||
lastHeartbeatTime = currentFrameTime;
|
||||
|
||||
try {
|
||||
|
||||
@@ -50,17 +50,9 @@ public class RaceLogic implements RunnableWithFramePeriod, Observer {
|
||||
public void run() {
|
||||
race.initialiseBoats();
|
||||
|
||||
try {
|
||||
countdown();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
countdown();
|
||||
|
||||
try {
|
||||
raceLoop();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
raceLoop();
|
||||
}
|
||||
|
||||
public void boolFalse(){
|
||||
@@ -71,7 +63,7 @@ public class RaceLogic implements RunnableWithFramePeriod, Observer {
|
||||
/**
|
||||
* Countdown timer until race starts.
|
||||
*/
|
||||
private void countdown() throws Exception {
|
||||
private void countdown() {
|
||||
|
||||
long previousFrameTime = System.currentTimeMillis();
|
||||
|
||||
@@ -110,7 +102,7 @@ public class RaceLogic implements RunnableWithFramePeriod, Observer {
|
||||
/**
|
||||
* Timer that runs for the duration of the race, until all boats finish.
|
||||
*/
|
||||
private void raceLoop() throws Exception {
|
||||
private void raceLoop() {
|
||||
|
||||
long previousFrameTime = System.currentTimeMillis();
|
||||
|
||||
@@ -199,4 +191,4 @@ public class RaceLogic implements RunnableWithFramePeriod, Observer {
|
||||
// else if(e.getBearing().degrees() > 270) System.out.println("Port");
|
||||
// else System.out.println("Behind");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user