Fixed most of issue #19 with new master?

This commit is contained in:
David Wu
2017-08-17 13:49:43 +12:00
parent fa5992bfb2
commit c08bafa566
16 changed files with 98 additions and 43 deletions
@@ -82,7 +82,7 @@ public class StartController extends Controller {
*/
private ControllerClient controllerClient;
private boolean isHost;
@@ -238,7 +238,7 @@ public class StartController extends Controller {
startWrapper.setVisible(false);
//start.setVisible(false);//TODO is this needed?
parent.beginRace(visualiserRaceEvent, controllerClient);
parent.beginRace(visualiserRaceEvent, controllerClient, isHost);
}
}
@@ -250,10 +250,13 @@ public class StartController extends Controller {
/**
* Show starting information for a race given a socket.
* @param socket network source of information
* @param isHost
*/
public void enterLobby(Socket socket) {
public void enterLobby(Socket socket, Boolean isHost) {
try {
this.isHost = isHost;
this.visualiserRaceEvent = new VisualiserRaceEvent(socket, RequestToJoinEnum.PARTICIPANT);
this.controllerClient = visualiserRaceEvent.getControllerClient();