Swiss, double elimination and round robin tournaments
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start with backend/routes/tournaments.js to understand the existing single-elimination flow, then inspect the tournament bracket or standings view and the test setup. The issue calls for pure format modules under backend/tournaments/formats/*.js, exhaustive property tests, and mobile-friendly views. Done means all three formats meet the stated rules, tie-breaks are documented on the tournament page, and npm test and node scripts/check-boundary.js pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Tournaments only support single elimination (format = 'single_elimination' in backend/routes/tournaments.js). Half the field is out after one match, which is a poor experience for a community event where most players came to play.
Formats to add
- Swiss: everyone plays a fixed number of rounds (default
ceil(log2(n))), paired against players with the same score. Nobody is eliminated. Best for large open events. - Double elimination: a winners bracket and a losers bracket, with a grand final where the winners-bracket player needs one win and the losers-bracket player needs two (bracket reset).
- Round robin: everyone plays everyone. Best for small groups of up to 8.
Rules that must hold
- Swiss pairing never repeats an opponent when another valid pairing exists, and gives a bye to the lowest-ranked player without one when the count is odd. Use a proper pairing algorithm rather than greedy pairing, which fails late in the event.
- Tie-breaks for Swiss and round robin: Buchholz score, then head to head, then total solve time. Document them on the tournament page.
- No-shows lose the match after the existing check-in window. Repeated no-shows are dropped from later rounds.
- Format logic lives in pure modules (
backend/tournaments/formats/*.js) with no database access, so it can be tested exhaustively.
Definition of done
- Property tests: for random field sizes from 2 to 128 and random results, every format finishes, every match has valid players, Swiss never repeats an avoidable pairing, and double elimination crowns exactly one winner.
- The bracket or standings view renders each format clearly, including on a phone.
npm testandnode scripts/check-boundary.jspass.
- Ngôn ngữ chính
- JavaScript
- Star
- 0
- Fork
- 2
- 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
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sennaicodes/codearena
-
Add issue and pull request templatesCó thể làm lại được @franciscorodr26 đã nhận 20 ngày trước và không có pull request nào đang mở. Đang mởdocumentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
sennaicodes/codearena#13 · 1 bình luận ·
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
sennaicodes/codearena#34 ·
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
sennaicodes/codearena#33 ·
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
sennaicodes/codearena#32 ·
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
sennaicodes/codearena#31 ·
Tất cả issue của sennaicodes/codearena
Issue tương tự
-
[Bug] Dashboard renders attachment links that resolve to 404 when the FILES binding is absentĐang mởbug 優先: 低
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
admission-deferred priority: medium status: ready work-class: scoped
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
melodic-software/claude-code-plugins#10887 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 91/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Channel access dropdown: "Private" option is not translated into Japanese in Zulip Server 12Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày