Tutorial option in title screen will now created a game with tutorial xmls. Host game will now created a game with the race xml instead of tutorial xml as well. Made changes to tutorial label in title. #story[1189]
This commit is contained in:
@@ -74,23 +74,29 @@ public class Event {
|
||||
|
||||
/**
|
||||
* Constructs an event, using various XML files.
|
||||
* @param singlePlayer Whether or not to create a single player event.
|
||||
* @param gameType Type of game to create. Determines which XML files to send
|
||||
* @throws EventConstructionException Thrown if we cannot create an Event for any reason.
|
||||
*/
|
||||
public Event(boolean singlePlayer) throws EventConstructionException {
|
||||
public Event(int gameType) throws EventConstructionException {
|
||||
|
||||
//String raceXMLFile = "mock/mockXML/raceTest.xml";
|
||||
String raceXMLFile = "mock/mockXML/raceTutorial.xml";
|
||||
//String boatsXMLFile = "mock/mockXML/boatTest.xml";
|
||||
String boatsXMLFile = "mock/mockXML/boatTutorial.xml";
|
||||
//String regattaXMLFile = "mock/mockXML/regattaTest.xml";
|
||||
String regattaXMLFile = "mock/mockXML/regattaTutorial.xml";
|
||||
String raceXMLFile = "mock/mockXML/raceTest.xml";
|
||||
|
||||
if (singlePlayer) {
|
||||
String boatsXMLFile = "mock/mockXML/boatTest.xml";
|
||||
|
||||
String regattaXMLFile = "mock/mockXML/regattaTest.xml";
|
||||
|
||||
|
||||
if (gameType == 1) {
|
||||
raceXMLFile = "mock/mockXML/raceSinglePlayer.xml";
|
||||
boatsXMLFile = "mock/mockXML/boatsSinglePlayer.xml";
|
||||
}
|
||||
|
||||
if (gameType == 2){
|
||||
raceXMLFile = "mock/mockXML/raceTutorial.xml";
|
||||
boatsXMLFile = "mock/mockXML/boatTutorial.xml";
|
||||
regattaXMLFile = "mock/mockXML/regattaTutorial.xml";
|
||||
}
|
||||
|
||||
//Read XML files.
|
||||
try {
|
||||
//this.raceXML = RaceXMLCreator.alterRaceToWind(raceXMLFile, 90);
|
||||
|
||||
Reference in New Issue
Block a user