Skip to content

Add Circuit Link wiring puzzle - #68

Merged
rmkr-dev merged 1 commit into
mainfrom
games/circuit
Oct 18, 2026
Merged

rmkr-dev merged 1 commit into
mainfrom
games/circuit

Conversation

@rmkr-dev

Copy link
Copy Markdown
Owner

New game at games/circuit/. Every tile is a piece of wire; tap tiles to turn them until the whole board is one circuit fed by the gold core, with every lamp lit and no wire pointing at an edge or a dead end.

  • Journey: 12 circuits over 4 tiers (4×4, 5×5, 6×6, then a tall 6×8 that still fits a phone). Three skips; a skip shows the wired board.
  • Blitz: 3 minutes, +10s per solve, -10s per skip, boards grow every 3 solves.
  • Daily: one 6×6 board seeded from the local date, so it's the same circuit all day. Replay it to beat your score.
  • Boards are random spanning trees (no tile with more than three wires) that then get scrambled, so every one is solvable. Par is the fewest quarter turns back to that solution.
  • Turn toggle (↻ / ↺), Lock mode to pin tiles you're sure of, Undo, Reset, and Hint (turns one wrong tile into place and locks it; a locked tile that's wrong gets picked first). A hint halves that circuit's points.
  • Scoring: tier base, par bonus, speed bonus in Journey and Daily, clean-streak bonus up to +50%. Results summary at the end of a run. Pause, and auto-pause when the tab is hidden.
  • Keyboard: arrows move between tiles, Enter/Space turns, T flips direction, L locks, U/Backspace undo, R reset, H hint, S skip, P pause.
  • localStorage: rmkr-game-circuit-best-journey, rmkr-game-circuit-best-blitz, rmkr-game-circuit-best-daily, and rmkr-game-circuit-daily-last (date of the last daily solve, for the ✓ in the HUD).
  • Uses the game-page tap handling (touch-action: manipulation). Styles are scoped under cl- in site.css.

Hub card and README entry added; home and nav unchanged.

Testing

  • node scripts/site-check.mjs passes.
  • Generator check in node: 500 boards per tier, all are spanning trees with max three wires per tile, the solution evaluates as solved, the scrambled start never does, and par matches the sum of per-tile turns. Daily board is identical for the same date.
  • Headless Chrome at 1280×800, 1440×900, 768×1024 (touch) and 360×740 (touch): no console errors, taps turn tiles (clockwise and anticlockwise), lock/undo/hint work, a Journey board solves and advances, Blitz timer and skip penalty work, Daily solves and ends the run, best scores save and survive a reload, no horizontal overflow, viewport scale stays at 1 after repeated taps. Tiles are about 49px wide at 360px on the 6-column boards.

@rmkr-dev
rmkr-dev merged commit ba3f5f5 into main Oct 18, 2026
1 check passed
@rmkr-dev
rmkr-dev deleted the games/circuit branch October 18, 2026 15:56
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