mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Reformatted and refactored the fileparser to get xml from resource folder
#fix #refactor #story[377] #pair[xyi25, zyt10]
This commit is contained in:
@@ -142,7 +142,7 @@ public class CanvasController {
|
||||
});
|
||||
|
||||
//set wind direction!!!!!!! can't find another place to put my code --haoming
|
||||
double windDirection = new ConfigParser("doc/examples/config.xml").getWindDirection();
|
||||
double windDirection = new ConfigParser("/config.xml").getWindDirection();
|
||||
windDirectionText.setText(String.format("%.1f°", windDirection));
|
||||
windArrowText.setRotate(windDirection);
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ public class RaceController {
|
||||
Race race = null;
|
||||
|
||||
public void initializeRace() {
|
||||
String raceConfigFile = "doc/examples/config.xml";
|
||||
String teamsConfigFile = "doc/examples/teams.xml";
|
||||
String raceConfigFile = "/config.xml";
|
||||
String teamsConfigFile = "/teams.xml";
|
||||
|
||||
try {
|
||||
race = createRace(raceConfigFile, teamsConfigFile);
|
||||
@@ -68,7 +68,7 @@ public class RaceController {
|
||||
return null;
|
||||
}
|
||||
|
||||
CourseParser course = new CourseParser("doc/examples/course.xml");
|
||||
CourseParser course = new CourseParser("/course.xml");
|
||||
race.addCourse(course.getCourse());
|
||||
|
||||
return race;
|
||||
|
||||
Reference in New Issue
Block a user