Refactor to single global lobby
Changes: - Removed room-based architecture, now using single global lobby - Players only need to enter their name to join - Game starts when all players in lobby are ready (min 2, max 8) - Simplified UI - no room name field, shows "Global Lobby" header - Updated all server events to use io.emit instead of io.to(roomName) Files modified: - server/index.js: Replaced rooms Map with single lobby object - public/index.html: Removed room name input, updated button text - public/js/network.js: Renamed joinRoom/leaveRoom to joinLobby/leaveLobby - public/js/ui.js: Simplified join flow, removed room name validation - public/js/app.js: Updated game header to show "GLOBAL LOBBY" - PLAN.md: Marked all phases as complete
This commit is contained in:
+3
-7
@@ -11,23 +11,19 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<!-- Room Selection Screen -->
|
||||
<!-- Login Screen -->
|
||||
<div id="room-screen" class="screen active">
|
||||
<h1>TETRIS<br>BATTLE ROYALE</h1>
|
||||
<div class="form-group">
|
||||
<label for="room-name">Room Name</label>
|
||||
<input type="text" id="room-name" placeholder="Enter room name">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="player-name">Your Name</label>
|
||||
<input type="text" id="player-name" placeholder="Enter your name">
|
||||
</div>
|
||||
<button id="join-btn">JOIN ROOM</button>
|
||||
<button id="join-btn">JOIN LOBBY</button>
|
||||
</div>
|
||||
|
||||
<!-- Lobby Screen -->
|
||||
<div id="lobby-screen" class="screen">
|
||||
<h2>Room: <span id="lobby-room-name"></span></h2>
|
||||
<h2>GLOBAL LOBBY</h2>
|
||||
<div id="player-list"></div>
|
||||
<button id="ready-btn">READY</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user