testsAndMisc/bucket_catch/packages/frontend
Krzysztof kuhy Rudnicki 3f4d8d4e90 bucket_catch: split usePuzzleGameLoop.ts 386 -> 194 + two modules
puzzleGeometry.ts (127)  board constants, ScheduledPiece, and the Union-Find
                           interval clustering in assignXPositions that makes a
                           100% score achievable; plus aabbCollision
  puzzleRender.ts (110)    the four canvas draw functions

Both were module-private, so nothing outside the hook sees either seam.

One thing was reshaped rather than moved: the inline clearRect+gradient in the
tick became a named drawBackdrop, so the render module owns every canvas call.
That is why coverage goes 583/217/97/534 -> 584/217/98/535 -- one statement,
one function, branches unchanged.

eslint reports 45 errors, exactly as it did before the split, which is the
check that matters here: the extraction added none. Those 45 are pre-existing
and were unmasked by the previous commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-17 10:05:37 +02:00
..
src bucket_catch: split usePuzzleGameLoop.ts 386 -> 194 + two modules 2026-08-17 10:05:37 +02:00
.gitignore Add bucket_catch: osu!catch browser game with 100% frontend test coverage 2026-06-27 12:21:35 +02:00
eslint.config.js Add bucket_catch: osu!catch browser game with 100% frontend test coverage 2026-06-27 12:21:35 +02:00
index.html Add bucket_catch: osu!catch browser game with 100% frontend test coverage 2026-06-27 12:21:35 +02:00
package.json Add bucket_catch: osu!catch browser game with 100% frontend test coverage 2026-06-27 12:21:35 +02:00
tsconfig.json Add bucket_catch: osu!catch browser game with 100% frontend test coverage 2026-06-27 12:21:35 +02:00
tsconfig.tsbuildinfo Add bucket_catch: osu!catch browser game with 100% frontend test coverage 2026-06-27 12:21:35 +02:00
vite.config.ts bucket_catch: fix typecheck so build works and eslint runs 2026-08-17 10:02:58 +02:00