re-implemented existing functionality in UI

- Correct player count is shown in server list
- Servers now advertise their capacity and number of players connected
- Players can click join on the servers in the server list
- Direct connect works
- Can set max players / server name in host dialog
- Server starts correctly when host clicked
- Implemented boat customization
- Implemented 'begin race button', and disabled it for players that aren't hosts
- Added countdown timer in lobby
- Fixed bug where app wouldn't close

Tags: #story[1245]
This commit is contained in:
Michael Rausch
2017-09-08 18:00:09 +12:00
parent b35126ff4e
commit cf4f8813d2
23 changed files with 509 additions and 346 deletions
@@ -18,6 +18,7 @@ import javafx.scene.layout.VBox;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import seng302.gameServer.ServerDescription;
import seng302.visualiser.GameClient;
import seng302.visualiser.ServerListener;
import seng302.visualiser.ServerListenerDelegate;
@@ -55,6 +56,7 @@ public class ServerListController implements Initializable, ServerListenerDelega
try {
ServerListener.getInstance().setDelegate(this);
System.out.println("Setting DH");
} catch (IOException e) {
logger.warn("Could not start Server Listener Delegate");
}
@@ -74,9 +76,8 @@ public class ServerListController implements Initializable, ServerListenerDelega
}
private void goToDirectConnectLobby() {
// TODO: 7/09/17 ajm412: Implement ability to connect to a lobby.
serverHostName.setText("Invalid Host Name or Port Number");
serverPortNumber.setText("");
// TODO: 7/09/17 Error handling
ViewManager.getInstance().getGameClient().runAsClient(serverHostName.getText(), Integer.parseInt(serverPortNumber.getText()));
}
@Override