Skip to content

Add owner-only “I was correct” override for private multiplayer rooms - #579

Draft
geoffrey-wu with Copilot wants to merge 6 commits into
mainfrom
copilot/add-i-was-correct-button
Draft

Add owner-only “I was correct” override for private multiplayer rooms#579
geoffrey-wu with Copilot wants to merge 6 commits into
mainfrom
copilot/add-i-was-correct-button

Conversation

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Private multiplayer rooms now support an owner moderation override to mark a player’s most recent tossup ruling as correct. This enables post-ruling correction without exposing the control in public rooms.

  • Owner-only private-room action

    • Added an “I was correct” action to each non-owner player entry in the multiplayer player-list dropdown.
    • Action is shown only when the viewer is the room owner and the room is private.
  • Server-side correctness override flow

    • Added a new multiplayer message type: mark-tossup-answer-correct.
    • Enforced guardrails before applying override:
      • room must be private
      • caller must be room owner
      • target player must exist
      • current state must be tossup + answer revealed
      • target must match previousTossup.userId
      • previous ruling must currently be incorrect
      • no active buzz in progress
    • Applies stat corrections for the target player (points, neg/zero rollback, correct-buzz bucket, correct celerity recompute).
    • In tossup+bonus rooms, restores bonus eligibility to the corrected player’s team.
    • Broadcasts mark-tossup-answer-correct for client UI/state sync.
  • Client-side sync and UI update

    • Added handler for mark-tossup-answer-correct to:
      • log moderation event in room history
      • apply stat delta in local room state
      • refresh/sort player list display
      • keep bonus-eligibility state aligned when provided by server
// server message dispatch
case 'mark-tossup-answer-correct':
  return this.markTossupAnswerCorrect({ userId, username }, message);

// owner action payload
socket.send(JSON.stringify({
  type: 'mark-tossup-answer-correct',
  targetId: userId,
  targetUsername: username
}));

Co-authored-by: geoffrey-wu <42471355+geoffrey-wu@users.noreply.github.com>
Copilot AI changed the title [WIP] Add "I was correct" button to multiplayer Add owner-only “I was correct” override for private multiplayer rooms Sep 11, 2026
Copilot AI requested a review from geoffrey-wu September 11, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a "I was correct" button to multiplayer

2 participants