6f24cfad30
- Server: Handle unready event to set player ready state to false - Client: Ready button toggles between READY and UNREADY - Client: Unready sends unready socket event to server Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
72 lines
2.4 KiB
HTML
72 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Tetris Battle Royale</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="css/style.css?v=10">
|
|
</head>
|
|
<body>
|
|
<div id="app">
|
|
<!-- Login Screen -->
|
|
<div id="room-screen" class="screen active">
|
|
<h1>TETRIS<br>BATTLE ROYALE</h1>
|
|
<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 LOBBY</button>
|
|
</div>
|
|
|
|
<!-- Lobby Screen -->
|
|
<div id="lobby-screen" class="screen">
|
|
<h2>GLOBAL LOBBY</h2>
|
|
<div id="player-list"></div>
|
|
<div id="spectator-list"></div>
|
|
<button id="ready-btn">READY</button>
|
|
</div>
|
|
|
|
<!-- Game Screen -->
|
|
<div id="game-screen" class="screen">
|
|
<div id="game-header">
|
|
<span id="game-room-name"></span>
|
|
<button id="leave-btn">LEAVE</button>
|
|
</div>
|
|
<div id="battle-grid"></div>
|
|
<div id="game-status"></div>
|
|
<!-- Touch Controls -->
|
|
<div id="touch-controls">
|
|
<div id="touch-dpad">
|
|
<button id="btn-left" class="touch-btn">←</button>
|
|
<button id="btn-down" class="touch-btn">↓</button>
|
|
<button id="btn-right" class="touch-btn">→</button>
|
|
</div>
|
|
<div id="touch-actions">
|
|
<button id="btn-rotate" class="touch-btn action-btn">↻</button>
|
|
<button id="btn-drop" class="touch-btn drop-btn">⤓</button>
|
|
<button id="btn-hold" class="touch-btn hold-btn">HOLD</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Game Over Screen (Overlay) -->
|
|
<div id="gameover-screen">
|
|
<h2>GAME OVER</h2>
|
|
<h3 id="winner-display"></h3>
|
|
<div id="final-scores"></div>
|
|
<button id="back-to-lobby">BACK TO LOBBY</button>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/socket.io/socket.io.js"></script>
|
|
<script src="js/network.js?v=6"></script>
|
|
<script src="js/game.js?v=4"></script>
|
|
<script src="js/renderer.js?v=5"></script>
|
|
<script src="js/ui.js?v=6"></script>
|
|
<script src="js/app.js?v=5"></script>
|
|
</body>
|
|
</html>
|