Swiss, double elimination and round robin tournaments
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- JavaScript
- Stelle
- 0
- Fork
- 2
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di sennaicodes/codearena
-
Add issue and pull request templatesForse di nuovo libera @franciscorodr26 l’ha presa 20 giorni fa e non c’è nessuna pull request aperta. Apertadocumentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
sennaicodes/codearena#13 · 1 commento ·
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
sennaicodes/codearena#34 ·
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
sennaicodes/codearena#33 ·
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
sennaicodes/codearena#32 ·
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
sennaicodes/codearena#31 ·
Tutte le issue di sennaicodes/codearena
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
glossyio/traffic-monitor#264 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
micromatch/picomatch#243 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
getComputedStyle().display is "" for span, a, b, label and other inline elements instead of "inline"Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
capricorn86/happy-dom#2556 ·
I maintainer di solito rispondono entro 1 giorno