Skip to content

Admin review and standings still use a 5x5 card after card-size generalization #11

Description

@YoyoJesus

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

  1. Configure at least 49 effective tiles, so the player card becomes 7x7.
  2. Have a player complete a row on the displayed 7x7 card.
  3. 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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions