Feature
Add a synchronized two-player Math Facts Reaction Duel for the paired ESP32-2432S028 CYDs.
Gameplay
- Both players receive the same math fact at the same synchronized start time.
- Each board displays multiple large answer buttons.
- The first confirmed correct answer wins the fact.
- An incorrect answer locks that player out briefly or awards the opponent the point, according to the selected ruleset.
- A match consists of a configurable number of facts, with synchronized scores and a deterministic final winner.
- The result is not final until the submitted answer and reaction event are validated against canonical game state.
Difficulty options
- Addition.
- Subtraction.
- Multiplication.
- Division with whole-number results.
- Mixed operations.
- Configurable operand ranges.
- Optional negative-number and missing-operand modes.
- Optional timed streak mode.
Fair timing
- Precommit each round before revealing the fact.
- Use a synchronized reveal deadline so network arrival order does not determine the winner.
- Record reaction events against the shared round/reveal identity.
- Compare validated reaction timing deterministically with an explicit tie window.
- Reject answers submitted before reveal, after timeout, or for a stale fact.
Synchronization
- Generate facts and answer choices deterministically from synchronized state.
- Guarantee exactly one correct displayed answer and canonicalize distractors.
- Use authenticated sender identity, active-game epochs, ACK/retry, replay rejection, and full-state reconciliation.
- Define behavior for simultaneous correct answers, simultaneous wrong answers, disconnects, and restart recovery.
Navigation
- Both boards provide an
EXIT control during countdowns, facts, results, and match completion.
- Either player may return both devices to the shared Home selector.
- EXIT dominates answer events, retries after packet/ACK loss, and cannot be undone by stale packets.
Acceptance criteria
Feature
Add a synchronized two-player Math Facts Reaction Duel for the paired ESP32-2432S028 CYDs.
Gameplay
Difficulty options
Fair timing
Synchronization
Navigation
EXITcontrol during countdowns, facts, results, and match completion.Acceptance criteria
-std=c++17 -Wall -Wextra -Werror.