Set it so the lobby view switches to race view depending on the race status passed in by the mock.

-Removed start button in lobby as it should be automatic.
-TODO: Synchronize the times across the whole race as they do not matching.

#Story[782]
This commit is contained in:
David Wu
2017-05-04 12:48:17 +12:00
7 changed files with 42 additions and 13 deletions
@@ -10,6 +10,7 @@ import seng302.Model.Boat;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
@@ -56,6 +57,8 @@ public class BoatData {
// write the content into xml file
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
DOMSource source = new DOMSource(doc);
//Serialize document.
@@ -63,6 +66,8 @@ public class BoatData {
StreamResult result = new StreamResult(stringWriter);
transformer.transform(source, result);
System.out.println(stringWriter.toString());
return stringWriter.toString();