diff --git a/doc/examples/teams.xml b/doc/examples/teams.xml
index 21908ccf..ed8cfcf1 100644
--- a/doc/examples/teams.xml
+++ b/doc/examples/teams.xml
@@ -4,31 +4,31 @@
Oracle Team USA
USA
- 10.0
+ 30.9
Artemis Racing
ART
- 10.0
+ 59.3
Emirates Team New Zealand
NZL
- 10.0
+ 51.5
Land Rover BAR
BAR
- 10.0
+ 29.9
SoftBank Team Japan
JAP
- 10.0
+ 99.6
Groupama Team France
FRC
- 10
+ 45.6
\ No newline at end of file
diff --git a/src/main/java/seng302/App.java b/src/main/java/seng302/App.java
index b2dd4250..b88f607b 100644
--- a/src/main/java/seng302/App.java
+++ b/src/main/java/seng302/App.java
@@ -14,9 +14,6 @@ public class App extends Application
primaryStage.setTitle("RaceVision");
primaryStage.setScene(new Scene(root));
-// seng302.models.OldApp.main(); // Run this to show how positions are updated
-// seng302.controllers.RaceController.initializeRace();
-
primaryStage.show();
}
diff --git a/src/main/java/seng302/controllers/RaceController.java b/src/main/java/seng302/controllers/RaceController.java
index e8471426..ae1bfb1e 100644
--- a/src/main/java/seng302/controllers/RaceController.java
+++ b/src/main/java/seng302/controllers/RaceController.java
@@ -1,15 +1,14 @@
package seng302.controllers;
import seng302.models.Boat;
-import seng302.models.OldFileParser;
import seng302.models.Race;
+import seng302.models.parsers.ConfigParser;
import seng302.models.parsers.CourseParser;
+import seng302.models.parsers.TeamsParser;
-import java.io.FileNotFoundException;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.Map;
import java.util.Random;
/**
@@ -21,11 +20,11 @@ public class RaceController {
Race race = null;
public void initializeRace() {
- String raceConfigFile;
- raceConfigFile = "doc/examples/config.json";
+ String raceConfigFile = "doc/examples/config.xml";
+ String teamsConfigFile = "doc/examples/teams.xml";
try {
- race = createRace(raceConfigFile);
+ race = createRace(raceConfigFile, teamsConfigFile);
} catch (Exception e) {
System.out.println("There was an error creating the race.");
}
@@ -37,36 +36,28 @@ public class RaceController {
}
}
- public Race createRace(String configFile) throws Exception {
+ public Race createRace(String configFile, String teamsConfigFile) throws Exception {
Race race = new Race();
- OldFileParser fp;
// Read team names from file
- try{
- fp = new OldFileParser(configFile);
- }
- catch (FileNotFoundException e){
- System.out.println("Config file does not exist");
- return null;
- }
+ TeamsParser tp = new TeamsParser(teamsConfigFile);
+
+ // Read course from file
+ ConfigParser config = new ConfigParser(configFile);
ArrayList boatNames = new ArrayList<>();
- ArrayList