Relay team battles (2v2)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
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
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 testandnode scripts/check-boundary.jspass.
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sennaicodes/codearena
-
Add issue and pull request templatesMay be free again @franciscorodr26 claimed this 17 days ago, and no pull request is open. Opendocumentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
sennaicodes/codearena#13 · 1 comment ·
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 45/100
sennaicodes/codearena#34 ·
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 35/100
sennaicodes/codearena#33 ·
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 45/100
sennaicodes/codearena#32 ·
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 38/100
sennaicodes/codearena#31 ·
All issues in sennaicodes/codearena
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
open-webui/open-webui#33196 · 2 comments ·
Maintainers usually reply within 1 day
-
area: apple-music area: build-release bug effort: small priority: high
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ChristianTabor/Argon#32 ·
Maintainers usually reply within 1 day
-
0️⃣ phase/new
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100