Fixed the start screen team list after merging. Team list shows boats competing in event again.

#story[572]
This commit is contained in:
Zhi You Tan
2017-05-02 18:52:31 +12:00
parent 3af15b2b95
commit 8233b75e05
3 changed files with 21 additions and 10 deletions
@@ -6,6 +6,7 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import java.util.ArrayList;
import java.util.List;
/**
* Class to create an XML object from the XML Packet Messages.
@@ -393,6 +394,8 @@ public class XMLParser {
//Boats
ArrayList<Boat> boats;
//Competing boats
List<Boat> competingBoats = new ArrayList<>();
/**
* Constructor for a BoatXMLObject.
@@ -427,6 +430,9 @@ public class XMLParser {
if (currentBoat.getNodeName().equals("Boat")) {
Boat boat = new Boat(currentBoat);
this.boats.add(boat);
if (boat.getBoatType().equals("Yacht")) {
competingBoats.add(boat);
}
}
//System.out.println(this.getBoats());
}
@@ -442,6 +448,9 @@ public class XMLParser {
public Double getCourseZoneSize() { return courseZoneSize; }
public ArrayList<Double> getZoneLimits() { return zoneLimits; }
public ArrayList<Boat> getBoats() { return boats; }
public List<Boat> getCompetingBoats() {
return competingBoats;
}
public class Boat {