# Sudoku Showdown Game Rules

This is the working rules reference for Sudoku Showdown v1. It is intended to
become the source for the future in-game "How to Play" and room-options pages.

## The Goal

Sudoku Showdown supports races for 2 to 5 players and personal Solo Runs. In a
showdown, everyone solves the same Sudoku puzzle at the same time. In Solo Run,
the goal is to improve your own Classic or Assisted record for each difficulty.

## Starting a Showdown

1. One player creates a room and shares its room code.
2. Other players enter that code to join the room.
3. The host chooses the difficulty and match rules while the room is in the
   lobby.
4. Every player selects "I'm ready."
5. The host starts the showdown. A short countdown begins, then everyone can
   enter numbers.

At least two players are required. If the host changes the difficulty or any
match rule, every player's ready status resets so everyone can review the new
setup before the game begins.

## Puzzle Difficulty

The host chooses one shared puzzle difficulty:

- Easy
- Medium
- Hard
- Expert

Difficulty changes the generated puzzle. The game currently uses distinct clue
counts for each level; solver-based difficulty ratings are planned for a later
release.

## Match Rule Presets

The host can select a preset or adjust the visible options. Any adjustment
changes the room to a Custom preset.

| Preset | Notes | Hints | Mistake penalty | Mistake cap |
| --- | --- | --- | --- | --- |
| Friendly | Allowed | 5 | None | None |
| Standard | Allowed | 3 | -5 points per mistake | None |
| Hardcore | Off | 0 | Progressive | 3 mistakes |

With a progressive penalty, the first mistake costs 5 points, the second costs
10, the third costs 15, and so on. Scores never go below zero.

## Host Options

Before the countdown, the host can set:

- Whether pencil-mark notes are allowed.
- The hint limit: 0, 1, 3, or 5.
- The mistake penalty: none, flat, or progressive.
- A mistake cap: off, 3, 5, or 7 mistakes.

Rules and difficulty lock when the countdown starts. The room displays a compact
rule summary in the lobby, during play, and after a player finishes.

## During Play

- A correct entry earns 10 points.
- Correct entries lock in place and cannot be erased.
- A hint reveals one correct value and costs 25 points.
- A completed puzzle earns a 100-point finish bonus.
- A wrong entry increments the player's mistake count and applies the room's
  penalty, if one is enabled.
- In v1, incorrect entries are removed after the mistake is recorded. The game
  does not leave a known-wrong number on the board.

If a player reaches the room's mistake cap, their board locks and they can watch
the live standings for the rest of the showdown.

## Finishing and Rankings

The first player to complete the puzzle correctly finishes first. Players who
finish at nearly the same time are separated by fewer mistakes, then fewer hints.
Players who are still solving rank by progress, then their mistake record and
score. Eliminated players rank after active and finished players.

Finished and eliminated players can remain in the room to watch the live
leaderboard.

## Solo Run

Solo Run uses the same generated Easy, Medium, Hard, and Expert puzzles without
creating a multiplayer room. It is designed for practice and personal
competition:

- Standard rules apply: notes are allowed, three hints are available, and each
  mistake costs 5 points.
- Correct entries earn 10 points, hints cost 25 points, and completing the
  puzzle earns a 100-point finish bonus.
- The run can be paused. Paused time does not count toward the finish time, and
  the full board is hidden until the player resumes.
- The finish screen shows elapsed time, score, mistakes, and hints used.
- Completed results are saved in Local stats on that browser and grouped by
  difficulty.

### Classic and Assisted Solo Leaderboards

Every Solo Run starts as Classic:

- Classic means the puzzle was completed without using a hint.
- Classic runs rank by fastest time, then fewer mistakes, then higher score.
- Using a hint immediately changes the run to Assisted.
- Assisted runs rank by fewer hints, then fewer mistakes, then fastest time,
  then higher score.
- An Assisted finish can never replace a Classic personal best.

Leaderboards contains separate Classic and Assisted Solo boards for Easy,
Hard, and Expert. Each board shows the personal best, recent average,
completion count, and up to ten ranked finishes.

Solo records belong to a private Local stats profile in v1. The web game stores
it in this browser, so clearing browser site data removes its record book.
Accounts, synchronized records, global rankings, and daily puzzles remain
future work.

## Multiplayer Leaderboards

Every active showdown includes a live, room-only leaderboard. Final room
standings remain readable for 24 hours while the room is available.

After a room reaches final results, Leaderboards saves the current player's
showdown summary in Local stats: placement, player count, difficulty, rule
preset, time, score, mistakes, and hints. It also displays their total
showdowns, wins, podiums, and win rate.

Solo times and multiplayer placements are never mixed into one ranking. Custom
rule rooms remain in a player's history but are not comparable across rooms.

## Future Rules Work

The current game gives immediate feedback on mistakes. A future competitive
mode may use delayed feedback, where entries are not immediately confirmed as
correct or incorrect. That is the appropriate context to revisit keeping
incorrect values on the board.

For the native Apple version, wrong entries should also use a negative audio
cue and native haptic feedback, with player sound controls.

### Scheduled Showdowns (Post-v1)

A future release may let a host schedule a showdown for a specific date, time,
and time zone. Its invitation code would remain valid before the match so
players can join the guest list and review the selected rules.

- The ready room opens 15 minutes before the scheduled start.
- The host still starts the showdown; it does not begin automatically.
- If the host has not started the match within 30 minutes after its scheduled
  time, the room expires.
- Once started, the match follows the normal playing, completed, and expired
  room lifecycle.
- Completed results remain available in read-only form for 24 hours.

Scheduled showdowns are intentionally outside the v1 scope because reliable
reminders, time-zone handling, rescheduling, and Apple push notifications need
to be designed together.
