Problem
The player card calculates cardSize from effectivePoolSize(tiles) and passes it to shuffleTilesForUser and detectBingo. The admin review page and loadStandings do not: both call the functions with their 5x5 defaults. The admin Svelte view also hard-codes GRID_SIZE.
Reproduction
- Configure at least 49 effective tiles, so the player card becomes 7x7.
- Have a player complete a row on the displayed 7x7 card.
- Open that player in
/admin/users/:id, or view the leaderboard.
The player sees a bingo, but the admin and standings calculation only evaluates a 5x5 subset and can report no bingo, blocking verification. The leaderboard also advertises a 24-tile maximum even for larger cards.
Suggested fix
Compute the effective pool size and card size once in each consumer (or centralize board-state construction), then pass that size through shuffleTilesForUser, detectBingo, and the admin grid and leaderboard maximum.
Affected code
src/routes/admin/users/[id]/+page.server.ts
src/routes/admin/users/[id]/+page.svelte
src/lib/server/standings.ts
src/routes/leaderboard/+page.server.ts
src/routes/bingo/+page.server.ts (the correct reference implementation)
Problem
The player card calculates
cardSizefromeffectivePoolSize(tiles)and passes it toshuffleTilesForUseranddetectBingo. The admin review page andloadStandingsdo not: both call the functions with their 5x5 defaults. The admin Svelte view also hard-codesGRID_SIZE.Reproduction
/admin/users/:id, or view the leaderboard.The player sees a bingo, but the admin and standings calculation only evaluates a 5x5 subset and can report no bingo, blocking verification. The leaderboard also advertises a 24-tile maximum even for larger cards.
Suggested fix
Compute the effective pool size and card size once in each consumer (or centralize board-state construction), then pass that size through
shuffleTilesForUser,detectBingo, and the admin grid and leaderboard maximum.Affected code
src/routes/admin/users/[id]/+page.server.tssrc/routes/admin/users/[id]/+page.sveltesrc/lib/server/standings.tssrc/routes/leaderboard/+page.server.tssrc/routes/bingo/+page.server.ts(the correct reference implementation)