From 884b5f8451f9e21d33828664d693b7548151c0ef Mon Sep 17 00:00:00 2001 From: Kealeand Date: Wed, 8 Oct 2025 13:52:39 +0200 Subject: [PATCH] memory game update --- index.html | 282 +++++++++++++++++++++++------------------- styles/stylesheet.css | 17 +++ 2 files changed, 175 insertions(+), 124 deletions(-) diff --git a/index.html b/index.html index a56555d..c48e4dd 100644 --- a/index.html +++ b/index.html @@ -561,147 +561,181 @@

Memory Game

- -

Click "Start Game" to begin!

+
+ +

Click "Start Game" to begin!


+

My record: 19

- + + // Start button for a regular ol' game + startBtn.addEventListener('click', () => { + if (gameActive == false) { + gameActive = true + gameSequence = []; + round = 1; + status.textContent = `Round ${round}`; + generateGrid(3, 3); + setTimeout(startRound, delay); // Start first round after delay + disableUserInput(); // Disable user input until first round starts + } + }); + + // Endless mode for those rather... daring + endlessBtn.addEventListener('click', () => { + if (gameActive == false) { + gameActive = true + endlessActive = true // It's endlessin' time (if you read this, I dare you to make it to round 20! (:< good luck.) + gameSequence = []; + status.textContent = `Round ${round}`; + generateGrid(3, 3); + setTimeout(startRound, delay); // Start first round after delay + disableUserInput(); // Disable user input until first round starts + } + }); +
6 Reasons why you should be a cat. 1. Free food. 2. Free rent. 3. Sleep as long as you want to. 4. Look great with no effort. 5. Toes look like beans. 6. Lisence to kill. diff --git a/styles/stylesheet.css b/styles/stylesheet.css index 593497d..1425924 100644 --- a/styles/stylesheet.css +++ b/styles/stylesheet.css @@ -195,4 +195,21 @@ section { height: 300px; overflow: hidden; overflow-y: scroll; +} + +@keyframes gradientShift { + 0% { background-position: 0% 50%; } + 50% { background-position: 175% 50%; } + 100% { background-position: 0% 50%; } +} + +.mmg-record { + background: linear-gradient(75deg, #ff5e5e, #e7932d, #f7d703, #4edb47, #25afff, #ed25ff); + background-clip:content-box; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-size: 150% 150%; + font-size: 20px; + font-weight: bolder; + animation: gradientShift 8s ease-in-out infinite; } \ No newline at end of file