Skip to content

feat: add I9kNinoMaze, the 404 maze with seeded random mazes - #42

Merged
ismail9k merged 9 commits into
mainfrom
claude/404-game-redesign-d92060
Oct 15, 2026
Merged

ismail9k merged 9 commits into
mainfrom
claude/404-game-redesign-d92060

Conversation

@ismail9k

Copy link
Copy Markdown
Member

What this changes

Adds I9kNinoMaze, 9k.school's 404 maze game rebuilt in the design system's language, so 9k.school, ismail9k.com and the9klabs.com can share one 404 game.

  • Seeded random mazes: every seed builds one maze, and the same seed always builds the same maze. Each maze is checked to be winnable before it is shown, by a search over (tile, turn) that is cross-checked against an independent solver in the tests. There are three difficulties: easy (11×9, 1 bug), normal (15×11, 2) and hard (21×13, 3).
  • Bar: shows a shareable maze code (Maze #1CBWUUF), the move count, a New maze button (dice) and a mute toggle (aria-pressed).
  • Controls: arrow keys, W A S D (also read by physical key, so they work on an Arabic layout), and an on-screen d-pad that stays left-to-right on RTL pages.
  • Chiptune sound moved from 9k.school: no audio before the visitor interacts, and a muted game never creates an AudioContext.
  • Localization: every string can be replaced through labels; counted messages are functions so they plug into i18n.
  • Server rendering: with no seed, the server renders an empty board with aria-busy and the client picks a seed on mount, so there is no hydration mismatch.
  • Public API: exports I9kNinoMaze, its types, and formatI9kNinoMazeSeed / parseI9kNinoMazeSeed. Also adds a showcase entry, a Storybook story, and five icons (arrowLeft, arrowRight, dice, volumeOn, volumeOff).

Spec: docs/superpowers/specs/2026-10-15-i9k-nino-maze-design.md. Plan: docs/superpowers/plans/2026-10-15-i9k-nino-maze.md.

Verification

  • npm run check passes: 1079 tests, format, lint, typecheck, library build, Storybook build, showcase prerender.
  • Checked in Storybook: light and dark themes; the Arabic page (the bar mirrors, the d-pad does not); Hard at 375px with no horizontal scroll; a full keyboard win (status, disabled d-pad, Play again / New maze).
  • A fresh whole-branch review found no critical issues. One important issue and two findings promoted to important were fixed, each test-first:
    • focus is no longer lost on a d-pad win;
    • W A S D now work on non-Latin layouts;
    • a label passed as undefined no longer crashes the component.

Known minor follow-ups:

  • A second "wall" announcement in a row is not re-announced.
  • The component looks wrong inside I9kSection variant="primary".
  • Hard-maze generation is synchronous; up to about 60ms on a dev machine.

🤖 Generated with Claude Code

ismail9k and others added 9 commits October 15, 2026 15:02
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A win from a d-pad button now moves focus to Play again instead of
dropping it with the disabled button, W A S D are also read by physical
key so they work on an Arabic layout, and a label passed as undefined
keeps its English default instead of breaking the board.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ismail9k
ismail9k merged commit 0d0c24e into main Oct 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant