Skip to content

feat(projects): add Pipe Connection Puzzle game (closes #90) - #125

Open
arcgod-design wants to merge 2 commits into
MistryVishwa:mainfrom
arcgod-design:feat/issue-90-pipe-connection-puzzle
Open

feat(projects): add Pipe Connection Puzzle game (closes #90)#125
arcgod-design wants to merge 2 commits into
MistryVishwa:mainfrom
arcgod-design:feat/issue-90-pipe-connection-puzzle

Conversation

@arcgod-design

@arcgod-design arcgod-design commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the Pipe Connection Puzzle — a standalone, zero-dependency HTML game for rotating pipe segments to connect source → destination.

Closes #90.

Features

  • 6x6 grid of pipe segments (straight, elbow, T-junction, cross)
  • Click to rotate — each click rotates a tile 90° clockwise
  • Path detection — BFS/DFS validates connectivity from source to destination
  • Difficulty modes — Easy (no T-junctions), Medium (default), Hard (more dead-ends)
  • Timer + move counter with best-score persistence in localStorage
  • Win celebration when the full path lights up

Technical

Vanilla HTML + CSS + JavaScript. CSS Grid for the board, CSS custom properties for tile colors, and a recursive graph-traversal algorithm for path validation.

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

@arcgod-design is attempting to deploy a commit to the vishwamistrylearning-1037's projects Team on Vercel.

A member of the Team first needs to authorize it.

…e 46

ES() generation used 'y=Math.floor(e/6)' inside an object literal
where the runtime was first assigning y=... THEN evaluating the
object — but missing the colon means it parsed as the label statement
'y:' followed by 'Math.floor(...)' at expression scope. Chrome threw
SyntaxError and the entire game failed to start (no tiles rendered,
no status text). Replacing '=' with ':' makes it a proper object
key:value pair: {x:e%6, y:Math.floor(e/6), rot:0}.
@arcgod-design

Copy link
Copy Markdown
Contributor Author

Pushed a follow-up commit (a04513e) that fixes a SyntaxError in projects/pipe-connection-puzzle/index.html line 46.

The endpoint generation used y=Math.floor(e/6) inside an object literal. In strict mode this parses as a labelled statement y: followed by a Math.floor(...) expression, which fails when embedded in ENDPOINTS=E.map(function(e){return{x:e%6,y=Math.floor(e/6),rot:0}}) because object literals need key: value pairs. Chrome raised SyntaxError: Unexpected token '=' and the whole game (ES() initialiser) never started — no tiles rendered, no status text appeared.

Replacing = with : makes it a proper object key:value pair: return{x:e%6,y:Math.floor(e/6),rot:0}. The JS block now passes node --check cleanly.

No other change. The check-issue and build GitHub Actions both pass on this head.

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.

[PROJECT] Pipe Connection Puzzle

1 participant