Quick Math
+A simple add or subtract problem appears. Tap the correct answer from four choices. Keep a streak going.
+ +Press Start, then tap the right answer.
+—
+ +From 0e6601f49b0cf719a3cc124953a64e3a9cad6917 Mon Sep 17 00:00:00 2001 From: Ramkumar Ethiraj <64294490+rmkr-dev@users.noreply.github.com> Date: Fri, 25 Sep 2026 15:53:32 +0000 Subject: [PATCH] Add Quick Math focus game --- README.md | 1 + assets/site.css | 52 +++++++++++ games/index.html | 6 +- games/math/index.html | 204 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 262 insertions(+), 1 deletion(-) create mode 100644 games/math/index.html diff --git a/README.md b/README.md index 0cdefc8..5a41cf1 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ The home page lists one **Games Hub** card (`games/`). Individual games live on - **Color Clash** (`games/colors/`) — Stroop-style: tap the ink color, not the word; best streak - **Odd One Out** (`games/odd/`) — four tiles, three match; tap the different shape or color; best streak - **Higher or Lower** (`games/higher/`) — guess if the next number is higher or lower; best streak +- **Quick Math** (`games/math/`) — mental arithmetic; tap the right answer; best streak - **Casual Quiz** (`games/quiz/`) — multiple-choice on India, Tamil Nadu, science, technology, and more, plus a General mix. Switch topic or level anytime. Marks stay in `localStorage`. Questions live only in `games/quiz/questions.json`. #### How to add or change quiz questions diff --git a/assets/site.css b/assets/site.css index 0388ffb..d8bb9ad 100644 --- a/assets/site.css +++ b/assets/site.css @@ -1113,6 +1113,52 @@ body[data-tool="collab"] .site-footer { display: none; } background: rgba(248, 113, 113, 0.12); } + +/* Quick Math */ +.math-stage { + display: flex; + flex-direction: column; + align-items: center; + gap: 1.1rem; + width: min(100%, 360px); + margin: 0 auto; +} +.math-problem { + margin: 0; + font-size: clamp(2.2rem, 10vw, 3.2rem); + font-weight: 900; + line-height: 1.15; + letter-spacing: -0.02em; + color: var(--color-gold, #ffc300); + min-height: 1.2em; + text-align: center; +} +.math-problem.ok { color: #4ade80; } +.math-problem.err { color: #f87171; } +.math-choices { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 0.7rem; + width: 100%; +} +.math-choice { + min-height: 64px; + font-size: 1.25rem; + font-weight: 800; + padding: 0.9rem 1rem; + border-radius: 14px; +} +.math-choice.is-correct { + border-color: rgba(74, 222, 128, 0.7); + background: rgba(74, 222, 128, 0.14); + color: #4ade80; +} +.math-choice.is-miss { + border-color: rgba(248, 113, 113, 0.7); + background: rgba(248, 113, 113, 0.12); + color: #f87171; +} + /* Higher or Lower */ .higher-stage { display: flex; @@ -1204,6 +1250,12 @@ body[data-tool="collab"] .site-footer { display: none; } height: 42px; } + .math-choice { + min-height: 60px; + font-size: 1.15rem; + padding: 0.8rem 0.85rem; + } + .higher-btn { min-height: 56px; font-size: 1rem; diff --git a/games/index.html b/games/index.html index 30aed73..35af6cd 100644 --- a/games/index.html +++ b/games/index.html @@ -4,7 +4,7 @@
A number from 1–99. Guess if the next is higher or lower. Best streak stays local.
+ +Add or subtract small numbers. Tap the right answer from four choices. Best streak stays local.
+Multiple-choice on India, Tamil Nadu, science, tech, and more. Switch topic or level anytime.
diff --git a/games/math/index.html b/games/math/index.html new file mode 100644 index 0000000..99231f4 --- /dev/null +++ b/games/math/index.html @@ -0,0 +1,204 @@ + + + + + +A simple add or subtract problem appears. Tap the correct answer from four choices. Keep a streak going.
+ +Press Start, then tap the right answer.
+—
+ +