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
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ Skillbook and Promptbook load JSON over `fetch`, so use a local server (opening
- **Number Base**
- **Local Stats** (counts stored only in this browser)


### Focus Games

Lightweight browser games for a quick break. No accounts, no ads, and scores stay in `localStorage` only. No sound effects in this first wave.

- **Games Hub** (`games/`) — landing page with links and short descriptions
- **Memory Match** (`games/memory/`) — flip cards, find pairs; best move count
- **Sequence Recall** (`games/sequence/`) — Simon-lite pads; best level reached
- **Number Slide** (`games/numbers/`) — 15-puzzle on a 4×4 board; best move count
- **Word Scramble** (`games/words/`) — unscramble a common word; best streak

### AI

Instruction packs and prompts for **GitHub Copilot**, **Claude Code**, and **Codex** only (no other agent runtimes are documented here).
Expand Down
215 changes: 215 additions & 0 deletions assets/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -582,3 +582,218 @@ body[data-tool="collab"] .site-footer { display: none; }
.ai-card-accent {
border-color: rgba(255, 195, 0, 0.35);
}

/* —— Focus Games —— */
.game-hud {
display: flex;
flex-wrap: wrap;
gap: 0.65rem 1rem;
align-items: center;
justify-content: space-between;
margin-bottom: 1rem;
padding: 0.85rem 1rem;
background: var(--color-card);
border: 1px solid var(--color-line);
border-radius: var(--radius);
}
.game-hud-stats {
display: flex;
flex-wrap: wrap;
gap: 0.75rem 1.25rem;
font-size: 0.85rem;
font-weight: 700;
}
.game-hud-stats span strong {
color: var(--color-accent);
font-variant-numeric: tabular-nums;
}
.game-hud-actions {
display: flex;
flex-wrap: wrap;
gap: 0.45rem;
align-items: center;
}
.game-board-wrap {
display: flex;
justify-content: center;
margin: 0.5rem 0 1rem;
}
.game-note {
text-align: center;
color: var(--color-muted);
font-size: 0.85rem;
min-height: 1.4rem;
margin: 0.35rem 0 0.75rem;
}
.game-note.ok { color: var(--color-ok); }
.game-note.err { color: var(--color-error); }
.game-back {
display: inline-block;
margin-bottom: 0.75rem;
font-size: 0.8rem;
font-weight: 700;
}

/* Memory Match */
.memory-grid {
display: grid;
grid-template-columns: repeat(4, minmax(64px, 88px));
gap: 0.55rem;
width: max-content;
max-width: 100%;
}
.memory-card {
aspect-ratio: 1;
min-width: 64px;
min-height: 64px;
border-radius: 12px;
border: 1px solid var(--color-line);
background: var(--color-input);
color: var(--color-text);
font-size: 1.55rem;
font-weight: 800;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
user-select: none;
-webkit-tap-highlight-color: transparent;
transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.memory-card:hover:not(:disabled) {
border-color: rgba(255, 195, 0, 0.55);
}
.memory-card:disabled { cursor: default; }
.memory-card.is-back {
background: linear-gradient(145deg, #1c2844, #121a2c);
color: transparent;
}
.memory-card.is-back::after {
content: "?";
color: var(--color-accent);
font-size: 1.35rem;
opacity: 0.85;
}
.memory-card.is-matched {
border-color: rgba(74, 222, 128, 0.45);
background: rgba(74, 222, 128, 0.12);
cursor: default;
}

/* Sequence Recall */
.sequence-pads {
display: grid;
grid-template-columns: repeat(2, minmax(110px, 140px));
gap: 0.75rem;
}
.seq-pad {
aspect-ratio: 1;
min-height: 110px;
border-radius: 18px;
border: 2px solid var(--color-line);
font-size: 1.1rem;
font-weight: 800;
cursor: pointer;
color: var(--color-text);
user-select: none;
-webkit-tap-highlight-color: transparent;
transition: filter 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.seq-pad:active:not(:disabled),
.seq-pad.is-lit {
filter: brightness(1.35);
transform: scale(0.97);
box-shadow: 0 0 0 3px rgba(255, 195, 0, 0.35);
}
.seq-pad:disabled { cursor: wait; opacity: 0.9; }
.seq-pad[data-pad="0"] { background: #1e3a5f; }
.seq-pad[data-pad="1"] { background: #3d2a12; }
.seq-pad[data-pad="2"] { background: #1f3d2e; }
.seq-pad[data-pad="3"] { background: #3a1f3d; }

/* Number Slide */
.slide-grid {
display: grid;
grid-template-columns: repeat(4, minmax(64px, 80px));
gap: 0.45rem;
width: max-content;
}
.slide-tile {
aspect-ratio: 1;
min-width: 64px;
min-height: 64px;
border-radius: 12px;
border: 1px solid var(--color-line);
background: var(--color-card);
color: var(--color-text);
font-size: 1.35rem;
font-weight: 800;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
user-select: none;
-webkit-tap-highlight-color: transparent;
font-variant-numeric: tabular-nums;
}
.slide-tile:hover:not(.is-empty):not(:disabled) {
border-color: var(--color-accent);
color: var(--color-accent);
}
.slide-tile.is-empty {
background: transparent;
border-color: transparent;
cursor: default;
pointer-events: none;
}
.slide-tile.is-home {
color: var(--color-accent);
}

/* Word Scramble */
.scramble-card {
max-width: 420px;
margin: 0 auto;
text-align: center;
}
.scramble-word {
font-size: clamp(1.6rem, 6vw, 2.2rem);
font-weight: 900;
letter-spacing: 0.18em;
color: var(--color-accent);
margin: 0.5rem 0 1.1rem;
font-family: var(--mono);
word-break: break-all;
}
.scramble-input {
font-size: 1.05rem !important;
text-align: center;
letter-spacing: 0.06em;
font-weight: 700;
margin-bottom: 0.85rem;
}
.scramble-actions {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
justify-content: center;
}

@media (max-width: 420px) {
.memory-grid,
.slide-grid {
grid-template-columns: repeat(4, minmax(56px, 1fr));
width: 100%;
}
.memory-card,
.slide-tile {
min-width: 0;
min-height: 56px;
font-size: 1.2rem;
}
.sequence-pads {
grid-template-columns: repeat(2, minmax(96px, 1fr));
width: 100%;
}
.seq-pad { min-height: 96px; }
}
19 changes: 12 additions & 7 deletions assets/site.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function () {
var CATS = ["Transform", "Security", "Time", "Data", "Design", "Dev helpers", "AI"];
var CATS = ["Transform", "Security", "Time", "Data", "Design", "Dev helpers", "AI", "Focus Games"];

var TOOLS = [
{ id: "transform", path: "transform/", name: "Payload Knife", blurb: "Pretty/minify JSON, JSON to CSV, and cURL to fetch.", cat: "Transform" },
Expand Down Expand Up @@ -37,7 +37,12 @@
{ id: "base", path: "base/", name: "Number Base", blurb: "Convert between binary, octal, decimal, and hex.", cat: "Dev helpers" },
{ id: "stats", path: "stats/", name: "Local Stats", blurb: "See tool opens stored only in this browser.", cat: "Dev helpers" },
{ id: "skillbook", path: "skillbook/", name: "Skillbook", blurb: "Reusable skills for Copilot, Claude Code, and Codex.", cat: "AI" },
{ id: "promptbook", path: "promptbook/", name: "Promptbook", blurb: "Ready-to-paste prompts for the same three tools.", cat: "AI" }
{ id: "promptbook", path: "promptbook/", name: "Promptbook", blurb: "Ready-to-paste prompts for the same three tools.", cat: "AI" },
{ id: "games", path: "games/", name: "Games Hub", blurb: "Simple focus games that run fully in your browser.", cat: "Focus Games" },
{ id: "memory", path: "games/memory/", name: "Memory Match", blurb: "Flip cards and find matching pairs.", cat: "Focus Games" },
{ id: "sequence", path: "games/sequence/", name: "Sequence Recall", blurb: "Watch the taps, then repeat the pattern.", cat: "Focus Games" },
{ id: "numbers", path: "games/numbers/", name: "Number Slide", blurb: "Slide tiles to sort 1–15 on a 4×4 board.", cat: "Focus Games" },
{ id: "words", path: "games/words/", name: "Word Scramble", blurb: "Unscramble a common word, then try the next one.", cat: "Focus Games" }
];

function rootPrefix() {
Expand All @@ -46,11 +51,11 @@
return body.getAttribute("data-root");
}
var path = (location.pathname || "").replace(/\\/g, "/");
if (/\/[a-z0-9-]+\/?(index\.html)?$/i.test(path) && path !== "/" && !/index\.html$/.test(path.replace(/\/[a-z0-9-]+\/?$/, "/"))) {
return "../";
}
if (/\/[a-z0-9-]+\/index\.html$/i.test(path)) return "../";
return "";
path = path.replace(/\/index\.html$/i, "/").replace(/\/+$/, "") || "/";
if (path === "/" || path === "") return "";
var parts = path.split("/").filter(Boolean);
if (!parts.length) return "";
return new Array(parts.length + 1).join("../");
}

function currentTool() {
Expand Down
48 changes: 48 additions & 0 deletions games/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<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, and word scramble. 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">
<link rel="stylesheet" href="../assets/site.css">
<script src="../assets/site.js" defer></script>
</head>
<body data-root="../" data-tool="games">
<main class="wrap page-main" id="main">
<h1 class="page-title">Focus Games</h1>
<p class="page-lead">Short, simple brain games that stay in your browser. Large tap targets, offline after first load, and best scores saved only in localStorage. No sound effects in this wave.</p>

<div class="hub-grid">
<a class="tool-card ai-card-accent" href="memory/">
<h3>Memory Match</h3>
<p>Flip cards on a 4×4 board and find matching pairs. Beat your best move count.</p>
</a>
<a class="tool-card ai-card-accent" href="sequence/">
<h3>Sequence Recall</h3>
<p>Watch the pads light up, then tap the same pattern back. Climb as far as you can.</p>
</a>
<a class="tool-card ai-card-accent" href="numbers/">
<h3>Number Slide</h3>
<p>Classic 15-puzzle on a 4×4 grid. Slide tiles into order with as few moves as possible.</p>
</a>
<a class="tool-card ai-card-accent" href="words/">
<h3>Word Scramble</h3>
<p>Unscramble a common English word, then hit Next for another. Keep a streak going.</p>
</a>
</div>

<h2 class="section-title">How it works</h2>
<div class="card">
<ul>
<li>Everything runs client-side — nothing is uploaded.</li>
<li>Best score / streak values use <code>localStorage</code> keys prefixed with <code>rmkr-game-</code>.</li>
<li>No ads, accounts, or external game CDNs.</li>
</ul>
</div>
</main>
</body>
</html>
Loading
Loading