mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Created BoatsParser.java to parse boats from server boat.xml and created a table on the start screen to display all the teams from server
#story[572]
This commit is contained in:
@@ -21,6 +21,10 @@ public class Boat {
|
||||
private int markLastPast;
|
||||
private String shortName;
|
||||
private int id;
|
||||
// new attributes to boat
|
||||
private int sourceID;
|
||||
private String boatName;
|
||||
private String country;
|
||||
|
||||
public Boat(String teamName) {
|
||||
this.teamName = teamName;
|
||||
@@ -45,6 +49,21 @@ public class Boat {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* New instance created by BoatsParser.
|
||||
*
|
||||
* @param sourceID source ID of the boat
|
||||
* @param boatName full name of the boat
|
||||
* @param shortName short name of the boat
|
||||
* @param country country of the boat
|
||||
*/
|
||||
public Boat(int sourceID, String boatName, String shortName, String country) {
|
||||
this.sourceID = sourceID;
|
||||
this.boatName = boatName;
|
||||
this.shortName = shortName;
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the team sailing the boat
|
||||
*
|
||||
@@ -141,4 +160,15 @@ public class Boat {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getSourceID() {
|
||||
return sourceID;
|
||||
}
|
||||
|
||||
public String getBoatName() {
|
||||
return boatName;
|
||||
}
|
||||
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user