feat: label crazy-mode high scores instead of hiding them
Previously a game that used crazy mode kept its local high score but
skipped the online submission entirely. The requirement changed: crazy
scores should count like any other score, but be recognisable as crazy.
Changes:
- Crazy-mode use is now tracked per player (Player::crazy_mode_used)
rather than per game. Balls dropped during one player's turn cannot
outlive that turn, so only the player who pressed the key is marked;
the other players' scores stay normal.
- Event::HighScoreCandidate carries { score, crazy } so the app knows
which kind of score the name-entry dialog is about to record.
- HighScore gains `crazy: bool` with #[serde(default)]. Save files and
server responses from before this change load as normal scores.
- The high-score table draws a small red "CRAZY" tag in the empty
column right of the score. That column is free regardless of name or
score length, so the tag never overlaps text.
- The browser build submits every score again, flag included. The
companion server change stores it; an older server ignores the field.
Test Plan:
- cargo test
- crazy_scores_are_flagged_on_the_high_score_candidate
- high_scores_without_a_crazy_flag_load_as_normal_scores
- Manual: use crazy mode, finish with a qualifying score, and check the
table (F9) shows the entry with the red CRAZY tag; a normal game's
entry has none.
This commit is contained in:
1 parent
1a216dc795
commit
3a00be5661
6 files changed
+89
-30
No files matched your search
+3
-3
@@ -81,9 +81,9 @@ for long end-to-end validation runs.
|
||||
|
||||
Crazy mode is a modern addition. Its balls bounce off walls, bumpers, and
|
||||
flippers and score through them, but skip sensors, holes, and the claw. When
|
||||
the main ball drains, a crazy ball takes its place before the turn ends. Scores
|
||||
from games that used crazy mode are not submitted to the online high-score
|
||||
table.
|
||||
the main ball drains, a crazy ball takes its place before the turn ends. A
|
||||
player who used crazy mode still enters the high-score table, with their entry
|
||||
labelled `CRAZY`.
|
||||
|
||||
The five original speed choices remain available in settings. Physics now uses
|
||||
the original invariant 100 Hz millipixel substep, batched as 5/4/3/2/1 steps on
|
||||
|
||||
Reference in new issue
Block a user