Multiple free-space tiles can render an incomplete card
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- full-stack
调研方向
先从 src/lib/bingo.ts 和 src/lib/server/cardShuffle.ts 中 effectivePoolSize、getCardSize 和 pickCardWithFreeSpace 的流程开始,然后检查受影响的 bingo 和 tile-admin server 路由。复现一个包含两个 free-space tiles 的 25-tile pool,并比较 raw 和 effective 计数。完成标准是阻止或规范化无效配置,并且 /bingo 不再渲染少于 25 个单元格。
由索引模型根据 Issue 内容生成。
描述
Problem
The admin UI permits multiple isFreeSpace tiles. effectivePoolSize subtracts every free space after the first, but getCardSize still returns the minimum size of 5. pickCardWithFreeSpace then drops all but one free-space tile and can return fewer than 25 cells. tooFewTiles uses the raw tile count, so it does not prevent rendering.
Reproduction
- Create a 25-tile pool with two tiles marked Free.
- Open
/bingo.
The effective pool is 24, the selected card has 23 regular tiles plus one centered free space (24 total), and the UI renders only 24 cells in a 5-column grid. The core calculation reproduces as { effectivePoolSize: 24, cardSize: 5, renderedTiles: 24 }.
Suggested fix
Validate or enforce exactly zero or one free-space tile, or base the availability check on the effective pool and require cardSize ** 2 selected tiles before showing the board. The tile admin should prevent the invalid configuration or clearly normalize extra free spaces.
Affected code
src/lib/bingo.tssrc/lib/server/cardShuffle.tssrc/routes/bingo/+page.server.tssrc/routes/admin/tiles/+page.server.ts
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
hacksu/bingo 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 3/5 1-2 天 新手友好度 72/100
-
难度 4/5 3-5 天 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 72/100
-
难度 3/5 1-2 天 新手友好度 78/100
相似的 Issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
Crush 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
catppuccin/catppuccin#3125 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
ElementsProject/cln-application#167 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 75/100
Quantco/pnpm-licenses#17 ·
-
难度 2/5 1-3 小时 新手友好度 75/100