Added functionality to host game and join a game in lobby. Host name and game name are not implemented yet.
#story[1087]
This commit is contained in:
@@ -79,8 +79,8 @@ public class ConnectionController extends Controller {
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
// TODO - replace with config file
|
||||
connections = FXCollections.observableArrayList();
|
||||
connections.add(new RaceConnection("livedata.americascup.com", 4941));
|
||||
connections.add(new RaceConnection("localhost", 4942));
|
||||
connections.add(new RaceConnection("livedata.americascup.com", 4941, null));
|
||||
connections.add(new RaceConnection("localhost", 4942, null));
|
||||
|
||||
connectionTable.setItems(connections);
|
||||
hostnameColumn.setCellValueFactory(cellData -> cellData.getValue().hostnameProperty());
|
||||
@@ -126,7 +126,7 @@ public class ConnectionController extends Controller {
|
||||
String portString = portField.getText();
|
||||
try{
|
||||
int port = Integer.parseInt(portString);
|
||||
connections.add(new RaceConnection(hostName, port));
|
||||
connections.add(new RaceConnection(hostName, port, null));
|
||||
}catch(NumberFormatException e){
|
||||
System.err.println("Port number entered is not a number");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user