From 832d276a2ed7efdb3115956cf10903cfe66df851 Mon Sep 17 00:00:00 2001 From: Wanderinglizrd Date: Mon, 20 Oct 2025 17:23:44 +0530 Subject: [PATCH 1/5] chore: Add initial implementation of Emoji Reaction Speed Test game --- .../EmojiReactionSpeedTest/README.md | 30 +++ .../EmojiReactionSpeedTest/index.css | 1 + .../EmojiReactionSpeedTest/index.html | 58 +++++ .../EmojiReactionSpeedTest/script.js | 238 ++++++++++++++++++ 4 files changed, 327 insertions(+) create mode 100644 Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/README.md create mode 100644 Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.css create mode 100644 Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.html create mode 100644 Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/script.js diff --git a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/README.md b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/README.md new file mode 100644 index 00000000..cd471a39 --- /dev/null +++ b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/README.md @@ -0,0 +1,30 @@ +# Emoji Reaction Speed Test + +Develop an interactive Pomodoro Timer web application that helps users manage productivity using the Pomodoro Technique. + +## How to play + +**Goal:** Quickly click the single matching emoji from a scattered group before the timer runs out. + +**Scoring:** Faster clicks and building a streak earn high points. A streak activates a 1.5x combo multiplier for bonus score. + +**Game Over:** Losing all three lives (by wrong clicks or timeouts) ends the game. + +## Features + +- **Customizable Timer:** Set work/break intervals, with pause/reset controls. +- **Task Management:** System to track tasks and completed Pomodoro sessions per task. +- **Visual Feedback:** Progress animation with color-coded timer states. +- **Statistics & Design:** Session statistics and a responsive, distraction-free interface. + +## Tech Stack + +HTML5 +CSS3 +JavaScript (Vanilla) + +## Future + +- localStorage persistence +- audio alerts +- customizable timer settings diff --git a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.css b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.css new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.css @@ -0,0 +1 @@ + diff --git a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.html b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.html new file mode 100644 index 00000000..e2cae6bb --- /dev/null +++ b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.html @@ -0,0 +1,58 @@ + + + + + + Emoji Reaction Speed Test + + + + +
+

Emoji Reaction Speed Test

+

+ Test your reaction speed by clicking on the emoji as soon as it appears! +

+
Target:
+
+ Score: 0 | Streak: + 0 (Best: 0) +
+
+ Lives: ❤️ ❤️ ❤️ + +
+
+
+
+
+
+
+
+ + + + + diff --git a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/script.js b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/script.js new file mode 100644 index 00000000..6099cdcd --- /dev/null +++ b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/script.js @@ -0,0 +1,238 @@ +let currentTarget = ""; +let score = 0; +let streak = 0; +let bestStreak = 0; +let lives = 3; +let comboMultiplier = 1; +let gameActive = false; +let roundStartTime = 0; +let reactionTimes = []; +let timerInterval = null; +let totalRounds = 0; +let emojis = [ + "😀", + "😂", + "😍", + "😎", + "🤔", + "😴", + "😡", + "😭", + "😱", + "🤯", + "🥳", + "😇", + "🤪", + "😷", + "🤢", + "👻", + "💩", + "🎃", + "🌟", + "🔥", +]; +let difficultySettings = { + Easy: { + timePerRound: 3000, + numberOfDecoys: 2, + comboThreshold: 3, + }, + Medium: { + timePerRound: 2000, + numberOfDecoys: 4, + comboThreshold: 5, + }, + Hard: { + timePerRound: 1000, + numberOfDecoys: 6, + comboThreshold: 7, + }, +}; +currentDifficulty = difficultySettings.Medium; + +const gameArea = document.getElementById("game-area"); +const targetDisplay = document.getElementById("target-display"); +const scoreDisplay = document.getElementById("score-display"); +const streakDisplay = document.getElementById("streak-display"); +const bestStreakDisplay = document.getElementById("best-streak-display"); +const livesDisplay = document.getElementById("lives-display"); +const comboBadge = document.getElementById("combo-badge"); +const timerBar = document.getElementById("timer-bar"); +const gameOverScreen = document.getElementById("game-over-screen"); +const difficultySelector = document.getElementById("difficulty-select"); +const startButton = document.getElementById("start-button"); +const restartButton = document.getElementById("restart-button"); + +const startGame = (difficulty) => { + score = 0; + streak = 0; + bestStreak = 0; + lives = 3; + comboMultiplier = 1; + reactionTimes = []; + gameActive = true; + if (timerInterval) clearInterval(timerInterval); + currentDifficulty = difficultySettings[difficulty]; + startRound(); + updateUI(); +}; +startRound = () => { + if (!gameActive) return; + clearGameArea(); + const randomIndex = Math.floor(Math.random() * emojis.length); + currentTarget = emojis[randomIndex]; + targetDisplay.textContent = currentTarget; + totalRounds++; + const targetPosition = Math.floor( + Math.random() * currentDifficulty.numberOfDecoys + ); + roundEmojis.splice(targetPosition, 0, currentTarget); + + for (let i = roundEmojis.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + [roundEmojis[i], roundEmojis[j]] = [roundEmojis[j], roundEmojis[i]]; + } +}; + +const updateUI = () => { + scoreDisplay.textContent = score; + streakDisplay.textContent = streak; + bestStreakDisplay.textContent = bestStreak; + livesDisplay.textContent = lives; + + const hearts = "❤️ ".repeat(lives).trim(); + livesDisplay.textContent = hearts || "💔"; + + if (comboMultiplier > 1) { + comboBadge.textContent = comboMultiplier + "x"; + comboBadge.style.display = "inline"; + } else { + comboBadge.style.display = "none"; + } + for (let i = roundEmojis.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + [roundEmojis[i], roundEmojis[j]] = [roundEmojis[j], roundEmojis[i]]; + } + + gameArea.innerHTML = ""; + const positions = []; + + roundEmojis.forEach((emoji) => { + const tile = document.createElement("div"); + tile.className = "emoji-tile"; + tile.textContent = emoji; + + let validPosition = false; + let attempts = 0; + let top, left; + + while (!validPosition && attempts < 20) { + top = Math.random() * 80 + 5; + left = Math.random() * 85 + 5; + + validPosition = true; + for (let pos of positions) { + const distance = Math.sqrt( + Math.pow(top - pos.top, 2) + Math.pow(left - pos.left, 2) + ); + if (distance < 15) { + validPosition = false; + break; + } + } + attempts++; + } + + positions.push({ top, left }); + tile.style.top = top + "%"; + tile.style.left = left + "%"; + gameArea.appendChild(tile); + }); + + startTimer(); + roundStartTime = Date.now(); +}; + +const startTimer = () => { + if (timerInterval) clearInterval(timerInterval); + const timePerRound = currentDifficulty.timePerRound; + timerBar.style.width = "100%"; + timerBar.classList.remove("warning", "danger"); + + timerInterval = setInterval(() => { + updateTimer(); + }, 50); +}; +const updateTimer = () => { + const elapsed = Date.now() - roundStartTime; + const timePerRound = currentDifficulty.timePerRound; + const remainingTime = timePerRound - elapsed; + const percentage = (remainingTime / timePerRound) * 100; + + timerBar.style.width = Math.max(0, percentage) + "%"; + + if (percentage < 30 && percentage >= 15) { + timerBar.classList.add("warning"); + timerBar.classList.remove("danger"); + } else if (percentage < 15) { + timerBar.classList.add("danger"); + timerBar.classList.remove("warning"); + } + + if (remainingTime <= 0) { + clearInterval(timerInterval); + handleTimeout(); + } +}; +const handleTimeout = () => { + streak = 0; + comboMultiplier = 1; + lives--; + updateUI(); + + if (lives <= 0) { + gameOver(); + } else { + setTimeout(startRound, 500); + } +}; + +const handleEmojiClick = (emoji, tile) => { + if (!gameActive) return; +}; +const calculateScore = () => {}; + +const gameOver = () => { + gameActive = false; + if (timerInterval) clearInterval(timerInterval); + document.getElementById("final-score").textContent = score; + document.getElementById("final-best-streak").textContent = bestStreak; + const avgTime = + reactionTimes.length > 0 + ? Math.round( + reactionTimes.reduce((a, b) => a + b, 0) / reactionTimes.length + ) + : 0; + document.getElementById("final-avg-time").textContent = + avgTime > 0 ? avgTime + " ms" : "N/A"; + + gameOverScreen.style.display = "flex"; +}; + +startButton.addEventListener("click", () => { + const selectedDifficulty = difficultySelector.value; + startGame(selectedDifficulty); +}); + +restartButton.addEventListener("click", () => { + const selectedDifficulty = difficultySelector.value; + startGame(selectedDifficulty); +}); + +gameArea.addEventListener("click", (event) => { + if (event.target.classList.contains("emoji-tile")) { + handleEmojiClick(event.target.textContent, event.target); + } +}); + +updateUI(); From 24ac97fa4a5e6eaaf6e2f4ea6e297464138a71bb Mon Sep 17 00:00:00 2001 From: Wanderinglizrd Date: Mon, 20 Oct 2025 17:29:09 +0530 Subject: [PATCH 2/5] feat: Implement emoji click handling and scoring logic --- .../EmojiReactionSpeedTest/script.js | 65 ++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/script.js b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/script.js index 6099cdcd..4002ebd1 100644 --- a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/script.js +++ b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/script.js @@ -199,8 +199,71 @@ const handleTimeout = () => { const handleEmojiClick = (emoji, tile) => { if (!gameActive) return; + + if (clickedEmoji === currentTarget) { + const reactionTime = Date.now() - roundStartTime; + reactionTimes.push(reactionTime); + correctClicks++; + + streak++; + if (streak > bestStreak) { + bestStreak = streak; + } + + calculateScore(reactionTime); + + element.classList.add("correct-flash"); + clearInterval(timerInterval); + + setTimeout(() => { + startRound(); + }, 500); + } else { + streak = 0; + comboMultiplier = 1; + lives--; + + element.classList.add("shake-error"); + updateUI(); + + if (lives <= 0) { + clearInterval(timerInterval); + gameOver(); + } else { + clearInterval(timerInterval); + setTimeout(() => { + startRound(); + }, 500); + } + } +}; + +// Scoring +const calculateScore = (reactionTime) => { + const basePoints = 10; + let speedBonus = 0; + + if (reactionTime < 500) { + speedBonus = 50; + } else if (reactionTime < 800) { + speedBonus = 30; + } else if (reactionTime < 1200) { + speedBonus = 15; + } else { + speedBonus = 5; + } + + if (streak >= currentDifficulty.comboThreshold && comboMultiplier === 1) { + comboMultiplier = 1.5; + comboBadge.style.display = "inline"; + comboBadge.style.animation = "pulse 0.5s"; + } + + const points = Math.round((basePoints + speedBonus) * comboMultiplier); + score += points; + + updateUI(); }; -const calculateScore = () => {}; const gameOver = () => { gameActive = false; From 28603e90b9f95cfdf7fca480ce0b9bc70ead46d2 Mon Sep 17 00:00:00 2001 From: Wanderinglizrd Date: Mon, 20 Oct 2025 17:52:11 +0530 Subject: [PATCH 3/5] feat: Add complete implementation with UI and game logic --- .../EmojiReactionSpeedTest/index.css | 189 ++++++++++++++++++ .../EmojiReactionSpeedTest/index.html | 4 +- .../{script.js => index.js} | 75 ++++--- 3 files changed, 238 insertions(+), 30 deletions(-) rename Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/{script.js => index.js} (87%) diff --git a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.css b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.css index 8b137891..17e32dd0 100644 --- a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.css +++ b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.css @@ -1 +1,190 @@ +body { + font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; + background: #1f2937; + color: #f3f4f6; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + min-height: 100vh; + overflow: hidden; +} +#stats-header { + display: flex; + justify-content: space-around; + align-items: center; + padding: 5px 10px 10px 10px; + background: #374151; + border-bottom: 2px solid #4b5563; + flex-wrap: wrap; + gap: 15px; +} + +#target-area { + font-size: 1.2rem; + text-align: center; +} + +#target-display { + font-size: 3rem; + display: block; + margin-top: 5px; + border: 3px solid #60a5fa; + border-radius: 8px; + padding: 5px 10px; +} + +#lives-combo, +#stats { + text-align: center; +} + +#combo-badge { + margin-left: 10px; + padding: 3px 8px; + background: #f59e0b; + color: black; + border-radius: 4px; + font-weight: bold; + animation: pulse 0.5s; +} + +@keyframes pulse { + 0%, + 100% { + transform: scale(1); + } + 50% { + transform: scale(1.2); + } +} + +#timer-container { + width: 100%; + height: 10px; + background: #4b5563; +} + +#timer-bar { + height: 100%; + width: 100%; + background-color: #10b981; + transition: width 0.1s linear, background-color 0.3s; +} + +#timer-bar.warning { + background-color: #f59e0b; +} + +#timer-bar.danger { + background-color: #ef4444; +} + +#game-area { + flex-grow: 1; + position: relative; + width: 90%; + max-width: 1200px; + height: 500px; + margin: 10px auto; + border: 2px dashed #4b5563; +} + +.emoji-tile { + position: absolute; + font-size: 4rem; + cursor: pointer; + transition: transform 0.1s; +} + +.emoji-tile:hover { + transform: scale(1.1); +} + +.correct-flash { + transform: scale(1.5) !important; + filter: drop-shadow(0 0 10px #10b981); + transition: transform 0.1s; +} + +.shake-error { + animation: shake 0.5s; + filter: drop-shadow(0 0 10px #ef4444); +} + +@keyframes shake { + 0%, + 100% { + transform: translateX(0); + } + 20%, + 60% { + transform: translateX(-5px); + } + 40%, + 80% { + transform: translateX(5px); + } +} + +#game-over-screen { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.9); + color: white; + display: none; + flex-direction: column; + justify-content: center; + align-items: center; + z-index: 100; + text-align: center; +} + +#final-stats p { + margin: 8px 0; + font-size: 1.1rem; +} + +#restart-button, +#start-button { + padding: 10px 20px; + margin-top: 20px; + font-size: 1.2rem; + cursor: pointer; + background: #f59e0b; + border: none; + border-radius: 5px; + color: black; + font-weight: bold; +} + +#restart-button:hover, +#start-button:hover { + background: #d97706; +} + +footer { + padding: 15px; + text-align: center; + background: #374151; + margin-top: auto; +} + +#controls-bar { + margin-bottom: 10px; +} + +#controls-bar label { + margin-right: 10px; +} + +#controls-bar select { + padding: 5px 10px; + margin-right: 10px; + border-radius: 4px; + border: none; +} diff --git a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.html b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.html index e2cae6bb..6930c1b9 100644 --- a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.html +++ b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.html @@ -4,8 +4,7 @@ Emoji Reaction Speed Test - - +
@@ -54,5 +53,6 @@

Game Over! 😭

Made by Ananyaa

+ diff --git a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/script.js b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.js similarity index 87% rename from Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/script.js rename to Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.js index 4002ebd1..a8ceb9a7 100644 --- a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/script.js +++ b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.js @@ -48,7 +48,13 @@ let difficultySettings = { comboThreshold: 7, }, }; -currentDifficulty = difficultySettings.Medium; +let currentDifficulty = difficultySettings.Medium; +let roundEmojis = []; +let correctClicks = 0; + +const clearGameArea = () => { + gameArea.innerHTML = ""; +}; const gameArea = document.getElementById("game-area"); const targetDisplay = document.getElementById("target-display"); @@ -64,17 +70,27 @@ const startButton = document.getElementById("start-button"); const restartButton = document.getElementById("restart-button"); const startGame = (difficulty) => { + // reset core game state score = 0; streak = 0; bestStreak = 0; lives = 3; comboMultiplier = 1; reactionTimes = []; + correctClicks = 0; + totalRounds = 0; + roundEmojis = []; gameActive = true; + if (timerInterval) clearInterval(timerInterval); - currentDifficulty = difficultySettings[difficulty]; - startRound(); + // defensive: if difficulty is invalid, fall back to Medium + currentDifficulty = difficultySettings[difficulty] || difficultySettings.Medium; + + // If the game-over screen was visible, hide it so the game area is interactive again + if (gameOverScreen) gameOverScreen.style.display = "none"; + updateUI(); + startRound(); }; startRound = () => { if (!gameActive) return; @@ -83,32 +99,17 @@ startRound = () => { currentTarget = emojis[randomIndex]; targetDisplay.textContent = currentTarget; totalRounds++; - const targetPosition = Math.floor( - Math.random() * currentDifficulty.numberOfDecoys - ); - roundEmojis.splice(targetPosition, 0, currentTarget); - - for (let i = roundEmojis.length - 1; i > 0; i--) { - const j = Math.floor(Math.random() * (i + 1)); - [roundEmojis[i], roundEmojis[j]] = [roundEmojis[j], roundEmojis[i]]; + roundEmojis = []; + const numDecoys = currentDifficulty.numberOfDecoys; + while (roundEmojis.length < numDecoys) { + const idx = Math.floor(Math.random() * emojis.length); + const cand = emojis[idx]; + if (cand === currentTarget) continue; + if (!roundEmojis.includes(cand)) roundEmojis.push(cand); } -}; - -const updateUI = () => { - scoreDisplay.textContent = score; - streakDisplay.textContent = streak; - bestStreakDisplay.textContent = bestStreak; - livesDisplay.textContent = lives; - - const hearts = "❤️ ".repeat(lives).trim(); - livesDisplay.textContent = hearts || "💔"; - if (comboMultiplier > 1) { - comboBadge.textContent = comboMultiplier + "x"; - comboBadge.style.display = "inline"; - } else { - comboBadge.style.display = "none"; - } + const targetPosition = Math.floor(Math.random() * (roundEmojis.length + 1)); + roundEmojis.splice(targetPosition, 0, currentTarget); for (let i = roundEmojis.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [roundEmojis[i], roundEmojis[j]] = [roundEmojis[j], roundEmojis[i]]; @@ -151,6 +152,24 @@ const updateUI = () => { startTimer(); roundStartTime = Date.now(); + updateUI(); +}; + +const updateUI = () => { + scoreDisplay.textContent = score; + streakDisplay.textContent = streak; + bestStreakDisplay.textContent = bestStreak; + livesDisplay.textContent = lives; + + const hearts = "❤️ ".repeat(lives).trim(); + livesDisplay.textContent = hearts || "💔"; + + if (comboMultiplier > 1) { + comboBadge.textContent = comboMultiplier + "x"; + comboBadge.style.display = "inline"; + } else { + comboBadge.style.display = "none"; + } }; const startTimer = () => { @@ -197,7 +216,7 @@ const handleTimeout = () => { } }; -const handleEmojiClick = (emoji, tile) => { +const handleEmojiClick = (clickedEmoji, element) => { if (!gameActive) return; if (clickedEmoji === currentTarget) { From e1cbf19cbe2d0739bd983aa6ef50ea2a3ddff30e Mon Sep 17 00:00:00 2001 From: Wanderinglizrd Date: Mon, 20 Oct 2025 18:05:13 +0530 Subject: [PATCH 4/5] feat: Enhance UI update game info section --- .../EmojiReactionSpeedTest/index.css | 22 ++++++++++++++----- .../EmojiReactionSpeedTest/index.html | 18 +++++++++++---- .../EmojiReactionSpeedTest/index.js | 3 ++- 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.css b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.css index 17e32dd0..fca1a8cb 100644 --- a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.css +++ b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.css @@ -1,6 +1,6 @@ body { - font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; - background: #1f2937; + font-family: "Segoe UI Emoji", "Apple Color Emoji", "Poppins", sans-serif; + background: #253851; color: #f3f4f6; margin: 0; padding: 0; @@ -9,6 +9,11 @@ body { min-height: 100vh; overflow: hidden; } +#game-info { + text-align: center; + margin-top: 0px; + font-family: "Poppins", sans-serif; +} #stats-header { display: flex; @@ -85,8 +90,8 @@ body { flex-grow: 1; position: relative; width: 90%; - max-width: 1200px; - height: 500px; + max-width: 1000px; + height: 450px; margin: 10px auto; border: 2px dashed #4b5563; } @@ -172,14 +177,21 @@ footer { text-align: center; background: #374151; margin-top: auto; + font-family: "Poppins", sans-serif; +} +p { + margin: 5px 0; + text-align: center; } - #controls-bar { margin-bottom: 10px; } #controls-bar label { margin-right: 10px; + font-weight: bold; + font-family: "Poppins", sans-serif; + color: #374151; } #controls-bar select { diff --git a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.html b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.html index 6930c1b9..347451e7 100644 --- a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.html +++ b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.html @@ -5,13 +5,23 @@ Emoji Reaction Speed Test + + +
-

Emoji Reaction Speed Test

-

- Test your reaction speed by clicking on the emoji as soon as it appears! -

+
+

Emoji Reaction Speed Test

+

+ Test your reaction speed by clicking on the emoji as soon as it + appears! +

+
+
Target:
Score: 0 | Streak: diff --git a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.js b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.js index a8ceb9a7..e0e9dec9 100644 --- a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.js +++ b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/index.js @@ -84,7 +84,8 @@ const startGame = (difficulty) => { if (timerInterval) clearInterval(timerInterval); // defensive: if difficulty is invalid, fall back to Medium - currentDifficulty = difficultySettings[difficulty] || difficultySettings.Medium; + currentDifficulty = + difficultySettings[difficulty] || difficultySettings.Medium; // If the game-over screen was visible, hide it so the game area is interactive again if (gameOverScreen) gameOverScreen.style.display = "none"; From 48bffdacffc64a7dfee92db69c993ad308952955 Mon Sep 17 00:00:00 2001 From: Ananyaa <181364995+ananyaa0518@users.noreply.github.com> Date: Mon, 20 Oct 2025 18:10:33 +0530 Subject: [PATCH 5/5] Update README.md --- .../EmojiReactionSpeedTest/README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/README.md b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/README.md index cd471a39..0ef2baee 100644 --- a/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/README.md +++ b/Domains/Frontend/MiniProjects/EmojiReactionSpeedTest/README.md @@ -1,6 +1,6 @@ # Emoji Reaction Speed Test -Develop an interactive Pomodoro Timer web application that helps users manage productivity using the Pomodoro Technique. +Develop an interactive reaction speed game where random emojis appear on screen and players must click the matching target emoji before time runs out. ## How to play @@ -12,10 +12,11 @@ Develop an interactive Pomodoro Timer web application that helps users manage pr ## Features -- **Customizable Timer:** Set work/break intervals, with pause/reset controls. -- **Task Management:** System to track tasks and completed Pomodoro sessions per task. -- **Visual Feedback:** Progress animation with color-coded timer states. -- **Statistics & Design:** Session statistics and a responsive, distraction-free interface. +- Random emoji generation with multiple decoy emojis on screen +- Target emoji display with countdown timer for each round +- Score tracking system with combo multipliers for consecutive hits +- Multiple difficulty levels (easy, medium, hard) with varying speeds +- Smooth animations and visual feedback for correct/incorrect clicks ## Tech Stack @@ -24,7 +25,4 @@ CSS3 JavaScript (Vanilla) ## Future - -- localStorage persistence -- audio alerts -- customizable timer settings +High scores, sound effects for hits/misses