Tutorial is played with tutorial map.
#story[1261]
This commit is contained in:
@@ -67,7 +67,7 @@ public class HostGameController extends Controller {
|
||||
* @param address address of the server
|
||||
* @param port port that the server is run off
|
||||
*/
|
||||
private void connectSocket(String address, int port) throws IOException {
|
||||
public void connectSocket(String address, int port) throws IOException {
|
||||
Socket socket = new Socket(address, port);
|
||||
RaceStartController rsc = (RaceStartController)loadScene("raceStart.fxml");
|
||||
rsc.enterLobby(socket, true);
|
||||
@@ -110,4 +110,8 @@ public class HostGameController extends Controller {
|
||||
mapImage.setImage(listOfMaps.get(currentMapIndex));
|
||||
}
|
||||
|
||||
public void setCurrentMapIndex(Integer index){
|
||||
this.currentMapIndex = index;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Modality;
|
||||
import mock.exceptions.EventConstructionException;
|
||||
import visualiser.app.App;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -80,9 +81,11 @@ public class TitleController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public void tutorialStartPressed() {
|
||||
public void tutorialStartPressed() throws IOException,
|
||||
EventConstructionException {
|
||||
App.gameType = 4;
|
||||
HostGameController hgc = new HostGameController();
|
||||
hgc.setCurrentMapIndex(4);
|
||||
hgc.hostGamePressed();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user