Issue 19 changes.

This commit is contained in:
David Wu
2017-08-17 12:50:41 +12:00
parent 8498701091
commit 6bc81f566e
7 changed files with 71 additions and 8 deletions
@@ -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