How Matches Work
Gameplay rules, win conditions, and technical backend synchronization.
Real-Time Synchronization (WebSockets)
Unlike traditional turn-based browser games, Multiplayer Sudoku relies on continuous, real-time data streaming using WebSockets (Socket.IO). This allows for instantaneous communication between your browser, the opponent's browser, and our central game server.
When you place a number on the grid, the following sequence occurs within milliseconds:
- Your browser sends an encrypted placement packet to the Python backend server.
- The server cross-references your placement against the cryptographic solution hash of the current board.
- If correct, the server broadcasts an "update" event to both you and your opponent, instantly ticking up your progress bar.
This architecture ensures that cheating via client-side modification is mathematically impossible, as all validation occurs securely on the server.
Win Conditions
A match of Multiplayer Sudoku is a pure race. The win conditions are absolute and unforgiving:
- Primary Win Condition: The first player to successfully fill all empty cells with the correct numbers (reaching 100% completion) instantly wins the match.
- Elimination Win: If your opponent makes three fatal mistakes (see below), they are eliminated from the match. You instantly win by default, regardless of your current completion percentage.
- Forfeit Win: If an opponent disconnects from the WebSocket server and fails to reconnect within the grace period, they forfeit the match and you are awarded the win.
The Mistake Penalty System
In solo Sudoku, guessing is a bad habit. In Multiplayer Sudoku, guessing is a fatal error.
To prevent players from brute-forcing the board by rapidly clicking random numbers, we enforce a strict 3-Strike Rule. The UI clearly displays your strike count at the top of the board.
- Strike 1 & 2: A prominent red flash alerts you to the error. You lose precious seconds of momentum, but you remain in the game.
- Strike 3: Match over. The board locks, your opponent is declared the winner, and if you are playing Ranked, you lose Elo points.
Note: Placing a pencil mark (note) is never penalized. The penalty system only triggers when you attempt to lock in a final digit.
Board Generation & Fairness
Fairness is the most critical aspect of competitive play. Our algorithm guarantees that both players receive a board with the exact same difficulty rating and the exact same starting configuration (givens).
Furthermore, all boards are guaranteed to have one unique solution. You will never encounter a board that requires a blind guess at the end.