mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Fixed some bugs
/#pair[hyi25, mra106]
This commit is contained in:
@@ -7,10 +7,8 @@ public class App
|
||||
{
|
||||
/**
|
||||
* Builds a race object for the AC35 course
|
||||
*
|
||||
* @param numberOfBoats, the number of boats to include in the race
|
||||
*/
|
||||
public static Race createRace(int numberOfBoats) throws Exception{
|
||||
public static Race createRace() throws Exception{
|
||||
Race race = new Race();
|
||||
|
||||
// Read team names from file
|
||||
@@ -18,6 +16,13 @@ public class App
|
||||
ArrayList<String> boatNames = new ArrayList<>();
|
||||
ArrayList<Map<String, Object>> teams = fp.getTeams();
|
||||
|
||||
//get race size
|
||||
int numberOfBoats = (int) fp.getRaceSize();
|
||||
|
||||
//get time scale
|
||||
int timeScale = (int) fp.getTimeScale();
|
||||
race.setTimeScale(timeScale);
|
||||
|
||||
for (Map<String, Object> team : teams) {
|
||||
boatNames.add((String) team.get("team-name"));
|
||||
}
|
||||
@@ -52,7 +57,7 @@ public class App
|
||||
Race race = null;
|
||||
|
||||
try{
|
||||
race = createRace(2);
|
||||
race = createRace();
|
||||
}
|
||||
catch (Exception e){
|
||||
System.out.println(e);
|
||||
|
||||
Reference in New Issue
Block a user