From f1e9470710fe5c3fefc93d8f5e83fc89598efa42 Mon Sep 17 00:00:00 2001 From: Cam Spry Date: Mon, 2 Mar 2026 02:42:54 -0500 Subject: [PATCH] Updates rules to be closer to original Y.A.R.N --- public/game.html | 17 ++++++++++++----- public/menu.html | 5 +++-- server.js | 46 +++++++++++++++++++++++++++++++++++----------- 3 files changed, 50 insertions(+), 18 deletions(-) diff --git a/public/game.html b/public/game.html index 38c75cf..e644812 100644 --- a/public/game.html +++ b/public/game.html @@ -477,7 +477,10 @@ hasSubmitted = false; hasVoted = false; updateUI(); - appendSystemMessage('New round started!'); + appendSystemMessage(`Round ${gameState.currentRound} started!`); + if (gameState.currentRound === gameState.gameSettings.roundLimit) { + appendSystemMessage(`It's the final round. Points count double!`); + } }); socket.on('gameOver', (data) => { @@ -553,9 +556,13 @@ case 'lobby': if (isHost) { gameBar.innerHTML = ` +
+ + +
- +
@@ -576,8 +583,6 @@ } else { gameBar.innerHTML = ` Waiting for host to start the game... - Score Limit: ${gameState.gameSettings.scoreLimit} - Time Limit: ${gameState.gameSettings.timeLimit}s `; } break; @@ -755,12 +760,14 @@ function startGame() { const scoreLimit = parseInt(document.getElementById('score-limit').value) || 100; + const roundLimit = parseInt(document.getElementById('round-limit').value) || 15; const timeLimit = parseInt(document.getElementById('time-limit').value) || 60; const botCount = parseInt(document.getElementById('bot-count').value) || 0; const startText = document.getElementById('start-text').value; socket.emit('startGame', { - scoreLimit: Math.max(10, Math.min(9999, scoreLimit)), + scoreLimit: Math.max(0, Math.min(9999, scoreLimit)), + roundLimit: Math.max(0, Math.min(100, roundLimit)), timeLimit: Math.max(15, Math.min(600, timeLimit)), botCount: Math.max(0, Math.min(5, botCount)), startText diff --git a/public/menu.html b/public/menu.html index 2b14ba7..0867b57 100644 --- a/public/menu.html +++ b/public/menu.html @@ -5,7 +5,7 @@ - Y.A.R.N. 2026 + Y.A.R.N. HTML5