|
|
|
|
@ -3,10 +3,12 @@ package visualiser.Controllers;
|
|
|
|
|
import javafx.collections.ObservableList;
|
|
|
|
|
import javafx.fxml.FXML;
|
|
|
|
|
import javafx.scene.layout.AnchorPane;
|
|
|
|
|
import visualiser.app.App;
|
|
|
|
|
import visualiser.gameController.ControllerClient;
|
|
|
|
|
import visualiser.model.VisualiserBoat;
|
|
|
|
|
import visualiser.model.VisualiserRaceEvent;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.net.Socket;
|
|
|
|
|
import java.net.URL;
|
|
|
|
|
import java.util.ResourceBundle;
|
|
|
|
|
@ -43,6 +45,8 @@ public class MainController extends Controller {
|
|
|
|
|
raceController.startRace(visualiserRace, controllerClient);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void endEvent() throws IOException { hostController.endEvent(); }
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Transitions from the server selection screen to the pre-race lobby for a given server.
|
|
|
|
|
* @param socket The server to read data from.
|
|
|
|
|
@ -62,7 +66,13 @@ public class MainController extends Controller {
|
|
|
|
|
/**
|
|
|
|
|
* Transitions into the title screen
|
|
|
|
|
*/
|
|
|
|
|
public void enterTitle(){ titleController.enterTitle(); }
|
|
|
|
|
public void enterTitle() {
|
|
|
|
|
try {
|
|
|
|
|
App.loadStart(App.getStage());
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Transitions into lobby screen
|
|
|
|
|
|