Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ The home page lists one **Games Hub** card (`games/`). Individual games live on
- **Middle Arrow** (`games/arrow/`) — tap the direction of the middle arrow while ignoring the flankers; time limit tightens with the streak; best streak
- **Same as Last** (`games/same/`) — shapes appear one at a time; tap Same or Different versus the previous shape; best streak
- **Light Recall** (`games/recall/`) — a few cells flash gold; tap every one you saw; one more cell per level, 3×3 growing to 4×4; best level
- **Go Stop** (`games/stop/`) — tap on GO, hold still on STOP; time window tightens with the streak; 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
Expand Down
35 changes: 35 additions & 0 deletions assets/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,41 @@ body[data-tool="collab"] .site-footer { display: none; }
transform: scale(0.98);
}

/* Go Stop */
.stop-pad {
width: min(100%, 320px);
min-height: 220px;
border-radius: 18px;
border: 1px solid rgba(255, 195, 0, 0.35);
font-size: clamp(1.6rem, 7vw, 2.2rem);
font-weight: 900;
letter-spacing: 0.06em;
cursor: pointer;
color: var(--color-text);
user-select: none;
-webkit-tap-highlight-color: transparent;
transition: background 0.15s ease, transform 0.08s ease, border-color 0.15s ease, color 0.15s ease;
}
.stop-pad:disabled { cursor: default; }
.stop-pad.is-idle {
background: linear-gradient(145deg, #1c2844, #121a2c);
color: var(--color-muted);
}
.stop-pad.is-go {
background: linear-gradient(145deg, #c9a000, #ffc300);
color: #12161f;
border-color: #ffc300;
transform: scale(1.02);
}
.stop-pad.is-stop {
background: linear-gradient(145deg, #2a3144, #161b28);
color: #9aa3b5;
border-color: rgba(154, 163, 181, 0.35);
}
.stop-pad:active:not(:disabled) {
transform: scale(0.98);
}

/* Tap Order */
.order-grid {
display: grid;
Expand Down
6 changes: 5 additions & 1 deletion games/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Focus Games | RMKR Toolkit</title>
<meta name="description" content="Simple browser focus games — memory, sequence, number slide, word scramble, reaction tap, tap order, color clash, odd one out, higher or lower, quick math, find-the-number, pop light, sum pair, missing number, even or odd, count the dots, middle arrow, same as last, light recall, and a casual quiz. No accounts, works offline after load.">
<meta name="description" content="Simple browser focus games — memory, sequence, number slide, word scramble, reaction tap, tap order, color clash, odd one out, higher or lower, quick math, find-the-number, pop light, sum pair, missing number, even or odd, count the dots, middle arrow, same as last, light recall, go stop, and a casual quiz. No accounts, works offline after load.">
<link rel="icon" type="image/svg+xml" href="../assets/favicon.svg">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap" rel="stylesheet">
Expand Down Expand Up @@ -93,6 +93,10 @@ <h3>Same as Last</h3>
<h3>Light Recall</h3>
<p>A few cells flash gold. Tap every one you saw. One more cell each level, from 3×3 up to 4×4.</p>
</a>
<a class="tool-card ai-card-accent" href="stop/">
<h3>Go Stop</h3>
<p>Gold means tap. Muted means wait it out. A go/no-go drill that tightens as your streak grows.</p>
</a>
<a class="tool-card ai-card-accent" href="quiz/">
<h3>Casual Quiz</h3>
<p>Multiple-choice on India, Tamil Nadu, science, tech, and more. Switch topic or level anytime.</p>
Expand Down
177 changes: 177 additions & 0 deletions games/stop/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Go Stop | RMKR Toolkit</title>
<meta name="description" content="GO cues: tap the pad. STOP cues: do not tap. Inhibition training with a tightening time window. Best streak saved locally.">
<link rel="icon" type="image/svg+xml" href="../../assets/favicon.svg">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../../assets/site.css">
<script src="../../assets/site.js" defer></script>
</head>
<body data-root="../../" data-tool="stop">
<main class="wrap page-main" id="main">
<a class="game-back" href="../">← Focus Games</a>
<h1 class="page-title">Go Stop</h1>
<p class="page-lead">Cues appear one at a time. When you see <strong>GO</strong> (gold), tap the pad or press Space before time runs out. When you see <strong>STOP</strong> (muted), do nothing — wait until it clears.</p>
<div class="game-hud">
<div class="game-hud-stats">
<span>Streak: <strong id="streak">0</strong></span>
<span>Best: <strong id="best">—</strong></span>
</div>
<div class="game-hud-actions">
<button type="button" class="btn btn-gold" id="startBtn">Start</button>
</div>
</div>
<p class="game-note" id="note" role="status">Press Start. Tap on GO, hold still on STOP. Space = tap.</p>
<div class="game-board-wrap">
<div class="even-stage" id="stage" aria-live="polite" aria-label="Go Stop board">
<button type="button" class="stop-pad is-idle" id="pad" aria-label="Cue pad" disabled>Ready</button>
</div>
</div>
</main>
<script>
(function () {
var KEY = "rmkr-game-stop-best";
var streak = 0, playing = false, busy = false, cue = null, timer = null, roundId = 0;
var pad = document.getElementById("pad");
var startBtn = document.getElementById("startBtn");

function loadBest() {
try {
var v = parseInt(localStorage.getItem(KEY) || "", 10);
return Number.isFinite(v) && v > 0 ? v : null;
} catch (e) { return null; }
}
function saveBest(n) {
var cur = loadBest();
if (cur == null || n > cur) {
try { localStorage.setItem(KEY, String(n)); } catch (e) {}
return n;
}
return cur;
}
function setNote(msg, kind) {
var el = document.getElementById("note");
el.textContent = msg || "";
el.className = "game-note" + (kind ? " " + kind : "");
}
function render() {
document.getElementById("streak").textContent = String(streak);
var b = loadBest();
document.getElementById("best").textContent = b == null ? "—" : String(b);
}
// ~1400ms down toward ~800ms as the streak grows (same idea as Middle Arrow / Pop Light).
function windowMs() {
var ms = 1400 - streak * 40;
return ms < 800 ? 800 : ms;
}
function clearTimer() {
if (timer) {
clearTimeout(timer);
timer = null;
}
}
function setPad(cls, label, enabled) {
pad.className = "stop-pad " + cls;
pad.textContent = label;
pad.disabled = !enabled;
pad.setAttribute("aria-label", label === "GO" ? "GO — tap now" : label === "STOP" ? "STOP — do not tap" : "Cue pad");
}
function end(why) {
clearTimer();
var ended = streak;
streak = 0;
playing = false;
busy = false;
cue = null;
render();
setPad("is-idle", "Ready", false);
setNote(why + (ended > 0 ? " Streak reset from " + ended + "." : " Press Play again."), "err");
startBtn.textContent = "Play again";
}
function success() {
clearTimer();
busy = true;
cue = null;
streak += 1;
var best = saveBest(streak);
render();
setNote("Nice. Streak " + streak + (best === streak ? " — new best!" : "."), "ok");
setPad("is-idle", "…", false);
setTimeout(function () {
if (playing) nextCue();
}, 380);
}
function nextCue() {
var id = ++roundId;
busy = true;
cue = null;
setPad("is-idle", "…", false);
setNote("Watch for GO or STOP…");
setTimeout(function () {
if (!playing || id !== roundId) return;
// ~55–60% GO, ~40–45% STOP
var isGo = Math.random() < 0.58;
cue = isGo ? "go" : "stop";
busy = false;
if (isGo) {
setPad("is-go", "GO", true);
setNote("GO — tap the pad (or Space).");
} else {
setPad("is-stop", "STOP", true);
setNote("STOP — do not tap.");
}
clearTimer();
timer = setTimeout(function () {
timer = null;
if (!playing || id !== roundId || busy) return;
if (cue === "stop") {
success();
} else if (cue === "go") {
end("Too slow — missed the GO window.");
}
}, windowMs());
}, 320);
}
function onTap() {
if (!playing || busy || !cue) return;
if (cue === "go") {
busy = true;
success();
return;
}
if (cue === "stop") {
end("False start — you tapped on STOP.");
}
}

pad.addEventListener("click", function (e) {
e.preventDefault();
onTap();
});
document.addEventListener("keydown", function (e) {
if (e.code === "Space" || e.key === " ") {
e.preventDefault();
onTap();
}
});
startBtn.addEventListener("click", function () {
clearTimer();
roundId += 1;
playing = true;
busy = true;
cue = null;
streak = 0;
render();
startBtn.textContent = "Restart";
setPad("is-idle", "…", false);
nextCue();
});
render();
})();
</script>
</body>
</html>
Loading