Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Multiple free-space tiles can render an incomplete card

Đang mở
#13 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
full-stack

Hướng nghiên cứu

Bắt đầu với luồng effectivePoolSize, getCardSize và pickCardWithFreeSpace trong src/lib/bingo.ts và src/lib/server/cardShuffle.ts, sau đó kiểm tra các server route bingo và tile-admin bị ảnh hưởng. Tái hiện một pool gồm 25 tile với hai tile free-space và so sánh các số đếm raw và effective. Hoàn tất có nghĩa là cấu hình không hợp lệ được ngăn chặn hoặc chuẩn hóa, và /bingo không còn render ít hơn 25 ô.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

  1. Create a 25-tile pool with two tiles marked Free.
  2. 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.ts
  • src/lib/server/cardShuffle.ts
  • src/routes/bingo/+page.server.ts
  • src/routes/admin/tiles/+page.server.ts
Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của hacksu/bingo

Tất cả issue của hacksu/bingo

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.