Added port number randomization

- Servers all run on different ports, so multiple servers can run on one host
- Port is displayed in lobby

Tags: #story[1281]
This commit is contained in:
Michael Rausch
2017-09-28 15:57:59 +13:00
parent 8810554ce9
commit a05a41d5ec
10 changed files with 75 additions and 79 deletions
@@ -71,6 +71,8 @@ public class LobbyController implements Initializable {
@FXML
private Label roomLabel;
@FXML
private Label portNumber;
@FXML
private Pane speedTokenPane, handlingTokenPane, windWalkerTokenPane, bumperTokenPane, randomTokenPane;
//---------FXML END---------//
@@ -85,6 +87,8 @@ public class LobbyController implements Initializable {
@Override
public void initialize(URL location, ResourceBundle resources) {
roomLabel.setText("");
portNumber.setText("");
this.playerBoats = ViewManager.getInstance().getGameClient().getAllBoatsMap();
if (this.playersColor == null) {
@@ -376,4 +380,8 @@ public class LobbyController implements Initializable {
public void setRoomCode(String roomCode) {
roomLabel.setText("Room: " + roomCode);
}
public void setPortNumber(String p){
portNumber.setText("Port: " + p);
}
}