diff --git a/Games/Clicks_PerMin/README.md b/Games/Clicks_PerMin/README.md new file mode 100644 index 0000000000..982f28d30a --- /dev/null +++ b/Games/Clicks_PerMin/README.md @@ -0,0 +1,33 @@ +# **Click Per Minute** + +--- + +
+ +## **Description 📃** + +- The "Click Per Minute Game" is an exciting and engaging game where users aim to achieve the highest number of clicks within one minute. It’s a fun and competitive way to test and improve your clicking speed and reaction time. + +## **functionalities 🎮** + +- Real-Time Point Counting: Keep track of your score in real-time as you click the button. +Timer: A one-minute countdown timer to challenge your speed. +Clicking Speed Display: See how fast you can click within the given time frame. + +
+ +## **How to play? 🕹️** +Simply click the "Click Me!" button as many times as you can within one minute. +Your score will be updated in real-time. +Once the timer reaches zero, your final score will be displayed, showing the total number of clicks per minute. +- + +
+ +## **Screenshots 📸** + +
+![image](../../assets/images/Clicks_PerMin.png) +
+ + diff --git a/Games/Clicks_PerMin/app.js b/Games/Clicks_PerMin/app.js new file mode 100644 index 0000000000..4111a23ae8 --- /dev/null +++ b/Games/Clicks_PerMin/app.js @@ -0,0 +1,30 @@ +document.addEventListener('DOMContentLoaded', function() { + const clickButton = document.getElementById('clickButton'); + const scoreDisplay = document.getElementById('score'); + const timerDisplay = document.getElementById('timer'); + const gameOverDisplay = document.getElementById('gameOver'); + const finalScoreDisplay = document.getElementById('finalScore'); + + let score = 0; + let timeLeft = 60; // 60 seconds + + clickButton.addEventListener('click', function() { + score++; + scoreDisplay.innerText = `Score: ${score}`; + }); + + // Timer function + const timer = setInterval(function() { + timeLeft--; + let minutes = Math.floor(timeLeft / 60); + let seconds = timeLeft % 60; + timerDisplay.innerText = `Time left: ${minutes}:${seconds.toString().padStart(2, '0')}`; + + if (timeLeft === 0) { + clearInterval(timer); + clickButton.disabled = true; + finalScoreDisplay.innerText = score; + gameOverDisplay.classList.remove('d-none'); + } + }, 1000); + }); \ No newline at end of file diff --git a/Games/Clicks_PerMin/index.html b/Games/Clicks_PerMin/index.html new file mode 100644 index 0000000000..254805d644 --- /dev/null +++ b/Games/Clicks_PerMin/index.html @@ -0,0 +1,27 @@ + + + + + + Click Per Minute Game + + + + + +
+

Click Per Minute Game

+

Click the button as many times as you can in 1 minute!

+ +

Score: 0

+

Time left: 1:00

+

Game over! Your score is clicks per minute.

+
+ + + + + + + + diff --git a/Games/Clicks_PerMin/style.css b/Games/Clicks_PerMin/style.css new file mode 100644 index 0000000000..612fbf0f08 --- /dev/null +++ b/Games/Clicks_PerMin/style.css @@ -0,0 +1,20 @@ +body { + background-color: #f8f9fa; + } + .container { + text-align: center; + margin-top: 100px; + } + .score-board, .timer-board { + font-size: 1.5rem; + margin-top: 20px; + } + .click-button { + font-size: 1.25rem; + padding: 15px 30px; + } + .game-over { + font-size: 1.75rem; + color: #dc3545; + margin-top: 20px; + } \ No newline at end of file diff --git a/README.md b/README.md index a64d16537e..d946cb51f2 100644 --- a/README.md +++ b/README.md @@ -345,6 +345,7 @@ This repository also provides one such platforms where contributers come over an | [Intellect Quest](https://github.com/Will2Jacks/GameZoneForked/tree/Task/Games/Intellect_Quest) | | [Number_Guessing_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Number_Guessing_Game) | | [Modulo_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Modulo_Game) | +| [Clicks_PerMin](https://github.com/kunjgit/GameZone/tree/main/Games/Clicks_PerMin) | diff --git a/assets/images/Clicks_PerMin.png b/assets/images/Clicks_PerMin.png new file mode 100644 index 0000000000..cfc51184ce Binary files /dev/null and b/assets/images/Clicks_PerMin.png differ