feat(ui): add main menu navbar and join game functionality

This commit is contained in:
2025-11-01 21:35:08 +01:00
parent afde6c02da
commit 325f2e44f6
11 changed files with 84 additions and 10 deletions

View File

@@ -70,6 +70,9 @@ class GameLobby private(
if (!sessionOpt.get.host) {
throw new NotHostException("Only the host can start the game!")
}
if (logic.getCurrentState != Lobby) {
throw new IllegalStateException("The game has already started!")
}
val playerNamesList = ListBuffer[AbstractPlayer]()
users.values.foreach { player =>
playerNamesList += PlayerFactory.createPlayer(player.name, player.id, HUMAN)