Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Relay team battles (2v2)

Open
#26 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Domain
api, backend, testing

Research direction

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.

Written by the indexing model from the issue text.

Description

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.
Dominant language
JavaScript
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sennaicodes/codearena

All issues in sennaicodes/codearena

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.