Fixed most of issue #19 with new master?

This commit is contained in:
David Wu
2017-08-17 13:49:43 +12:00
parent fa5992bfb2
commit c08bafa566
16 changed files with 98 additions and 43 deletions
@@ -43,9 +43,17 @@ public class RaceLogic implements RunnableWithFramePeriod {
public void run() {
race.initialiseBoats();
countdown();
try {
countdown();
} catch (Exception e) {
e.printStackTrace();
}
raceLoop();
try {
raceLoop();
} catch (Exception e) {
e.printStackTrace();
}
}
public void boolFalse(){
@@ -56,7 +64,7 @@ public class RaceLogic implements RunnableWithFramePeriod {
/**
* Countdown timer until race starts.
*/
private void countdown() {
private void countdown() throws Exception {
long previousFrameTime = System.currentTimeMillis();
@@ -95,7 +103,7 @@ public class RaceLogic implements RunnableWithFramePeriod {
/**
* Timer that runs for the duration of the race, until all boats finish.
*/
private void raceLoop() {
private void raceLoop() throws Exception {
long previousFrameTime = System.currentTimeMillis();