Issue 19 changes.
This commit is contained in:
@@ -36,6 +36,8 @@ public class HostController extends Controller {
|
||||
@FXML
|
||||
AnchorPane hostWrapper;
|
||||
|
||||
private Event game;
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
@@ -47,7 +49,7 @@ public class HostController extends Controller {
|
||||
*/
|
||||
public void hostGamePressed() throws IOException{
|
||||
try {
|
||||
Event game = new Event(false);
|
||||
this.game = new Event(false);
|
||||
game.start();
|
||||
connectSocket("localhost", 4942);
|
||||
} catch (EventConstructionException e) {
|
||||
@@ -56,6 +58,10 @@ public class HostController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public void endEvent() throws IOException {
|
||||
game.endEvent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to a socket
|
||||
* @param address address of the server
|
||||
|
||||
Reference in New Issue
Block a user