Updated the HostGame now has images for the maps and the map can be picked

#story[1193]
This commit is contained in:
hba56
2017-09-06 13:49:18 +12:00
parent 9560486248
commit 4eac3ea8b5
3 changed files with 49 additions and 15 deletions
@@ -78,12 +78,22 @@ public class Event {
* @param singlePlayer Whether or not to create a single player event.
* @throws EventConstructionException Thrown if we cannot create an Event for any reason.
*/
public Event(boolean singlePlayer) throws EventConstructionException {
public Event(boolean singlePlayer, int mapIndex) throws EventConstructionException {
System.out.println(XMLUtilities.validateXML(this.getClass().getClassLoader().getResource("mock/mockXML/iMapLayout.xml").toString()
, this.getClass().getClassLoader().getResource("mock/mockXML/schema/raceSchema.xsd")));
//String raceXMLFile = "mock/mockXML/raceTest.xml";
String raceXMLFile = "mock/mockXML/iMapLayout.xml";
String raceXMLFile;
switch (mapIndex){
case 0:raceXMLFile = "mock/mockXML/raceTest.xml";
break;
case 1:raceXMLFile = "mock/mockXML/oMapLayout.xml";
break;
case 2: raceXMLFile = "mock/mockXML/iMapLayout.xml";
break;
default:raceXMLFile = "mock/mockXML/raceTest.xml";
}
String boatsXMLFile = "mock/mockXML/boatTest.xml";
String regattaXMLFile = "mock/mockXML/regattaTest.xml";