Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Relay team battles (2v2)

Aperta
#26 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, nextjs, node.js
Ambito
api, backend, testing

Direzione di ricerca

Start by reading backend/server.js and the planned module split in #17, then inspect the existing battle and socket tests. Build the separate team-battle room and state, including server-enforced turns, disconnect handling, private chat, and code visibility. Done means a recorded four-browser battle and the specified socket tests pass, along with npm test and node scripts/check-boundary.js.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement help wanted

Every battle is one player against one player. Relay team battles add a format that friends can play together: two teams of two race on one problem, and teammates take turns at a shared editor.

Design

  • Each team shares one editor. Control passes between teammates every 90 seconds (configurable). The player not typing sees the code live and can chat with their teammate only.
  • Teams see the other team's test progress but never its code, until the battle ends.
  • First team to pass every test wins. Partial credit and ties follow the same rules as one-on-one battles.
  • Queue as a pre-made pair (invite a friend) or solo, with solo players paired into teams by rating.
  • Unranked at first. Team ratings need their own design and are out of scope.

Engineering notes

  • Build it as a separate module with its own room and state. Do not add team branches to the one-on-one battle code in backend/server.js (see #17 for the planned split).
  • The server owns the turn timer. A player whose turn it is not cannot edit, enforced on the server, not just hidden in the UI.
  • A teammate disconnecting hands control to the other teammate immediately. Rejoining restores their place in the rotation.

Definition of done

  • A recorded four-browser battle, including a disconnect mid-turn.
  • Socket tests for turn handoff, edits out of turn being rejected, team-only chat and the opposing team never receiving code.
  • npm test and node scripts/check-boundary.js pass.
Lingua principale
JavaScript
Stelle
0
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sennaicodes/codearena

Tutte le issue di sennaicodes/codearena

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.