Merge remote-tracking branch 'remotes/origin/temp77' into story77
# Conflicts: # racevisionGame/src/main/java/visualiser/Controllers/InGameLobbyController.java # racevisionGame/src/main/resources/visualiser/scenes/gameLobby.fxml # racevisionGame/src/main/resources/visualiser/scenes/hostgame.fxml
This commit is contained in:
@@ -9,6 +9,7 @@ import javafx.scene.control.TableView;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import network.Messages.HostGame;
|
||||
import visualiser.app.MatchBrowserSingleton;
|
||||
import visualiser.model.RaceConnection;
|
||||
import visualiser.network.MatchBrowserClientRunnable;
|
||||
import visualiser.network.MatchBrowserInterface;
|
||||
@@ -40,9 +41,9 @@ public class LobbyController extends Controller {
|
||||
|
||||
//the socket for match browser
|
||||
private DatagramSocket udpSocket;
|
||||
|
||||
private MatchBrowserLobbyInterface matchBrowserLobbyInterface;
|
||||
|
||||
|
||||
public void initialize() {
|
||||
// set up the connection table
|
||||
connections = FXCollections.observableArrayList();
|
||||
@@ -62,6 +63,9 @@ public class LobbyController extends Controller {
|
||||
}
|
||||
});
|
||||
joinGameBtn.setDisable(true);
|
||||
|
||||
this.udpSocket = MatchBrowserSingleton.getInstance().getUdpSocket();
|
||||
receiveMatchData();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,8 +117,7 @@ public class LobbyController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public void setupSocket(DatagramSocket udpSocket){
|
||||
this.udpSocket = udpSocket;
|
||||
public void receiveMatchData(){
|
||||
matchBrowserLobbyInterface = new MatchBrowserLobbyInterface();
|
||||
try {
|
||||
matchBrowserLobbyInterface.startReceivingHostData(new DatagramSocket(4941));
|
||||
|
||||
Reference in New Issue
Block a user