-
Notifications
You must be signed in to change notification settings - Fork 0
Comparing changes
Open a pull request
base repository: cycle-five/runecast-protocol
base: master
head repository: cycle-five/runecast-protocol
compare: adventure-mode
- 8 commits
- 5 files changed
- 2 contributors
Commits on Apr 21, 2026
-
adventure: GameConfig.adventure_level, LevelTargets, AdventureLevelRe…
…sult GameConfig gains optional adventure_level (Some signals an Adventure Mode session, unblocking bot injection + level-pinned config on the backend) and level_targets so the client can render 1/2/3-star thresholds during play. New ServerMessage::AdventureLevelResult emitted after GameOver on adventure runs — carries final score, stars, personal-best flag, and any newly unlocked level. Server writes adventure_progress authoritatively before emitting, so the client treats it as read-only state.
Configuration menu - View commit details
-
Copy full SHA for f9d0210 - Browse repository at this point
Copy the full SHA f9d0210View commit details -
Configuration menu - View commit details
-
Copy full SHA for f5916ab - Browse repository at this point
Copy the full SHA f5916abView commit details
Commits on Apr 23, 2026
-
adventure: add duration_ms to AdventureLevelResult
Carries run duration (ms) from game creation to game_over so the adventure result modal can render "Time 2:34" without an extra round-trip. Optional on the wire via skip_serializing_if so older clients aren't bothered. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for ad7f142 - Browse repository at this point
Copy the full SHA ad7f142View commit details -
grid: add is_hole field to GridCell for asymmetric boards
Opt-in flag, default false, skip_serializing_if not-is_hole so wire format stays unchanged for normal cells. Lets Adventure Mode declare per-cell "no tile" positions that render dark and can't be part of a word path. Bonus/gem/letter-rolling pipeline respects the flag at the backend. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for bcfc5c2 - Browse repository at this point
Copy the full SHA bcfc5c2View commit details -
adventure: AdventureEvent server-message for random events
Carries a bomb/snake/ufo event from the backend's event scheduler to the client. Includes the post-effect grid snapshot so the client can redraw atomically, plus affected_positions for cell-level animation and a server-localized label for the toast. kind is a string rather than a nested enum so unknown kinds degrade gracefully on older clients. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 0497d78 - Browse repository at this point
Copy the full SHA 0497d78View commit details
Commits on Apr 24, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 11b7656 - Browse repository at this point
Copy the full SHA 11b7656View commit details -
review: duration_ms u64 + AdventureEventKind enum
Addresses both Gemini comments on PR #19: 1. AdventureLevelResult.duration_ms is now Option<u64> instead of Option<i64>. Durations are non-negative, and this matches the rest of the protocol's duration / interval fields (heartbeat_interval_ms: u32, server_time: u64). 2. AdventureEvent.kind is now a typed AdventureEventKind enum instead of a free-form String. Variants Bomb / Snake / Ufo cover the designed event set; the #[serde(other)] Unknown variant catches any future kind a newer server emits without breaking older clients that pre-date the addition. The prior "string for backward compat" rationale didn't hold up — AdventureEvent is itself a new variant, so older clients already fail to deserialize the whole message. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 29dadad - Browse repository at this point
Copy the full SHA 29dadadView commit details -
review: serde round-trip tests for adventure types
Addresses all seven Copilot review comments on PR #19. Each new test is scoped to one type so a future field / rename breaks a single assertion instead of a bundle. types.rs: - test_game_config_serialization: extended to cover adventure_level and level_targets — omitted when None, present with the expected wire names when Some. - test_game_config_deserialization: extended to confirm the new fields default to None on missing input and decode correctly when the client provides them. - test_level_targets_serde_round_trip: new focused test locking in the exact one_star / two_star / three_star wire field names. - test_grid_cell_is_hole_wire_compat: new test confirming is_hole is skipped when false, emitted when true, and defaults to false on deserialization from JSON that omits the field. - test_adventure_event_kind_serde: new test covering the known variants (snake_case names) and the forward-compat #[serde(other)] Unknown fallback. server_messages.rs: - test_message_type: extended with assertions for AdventureLevelResult and AdventureEvent so the match in message_type() can't drift from the enum. - test_adventure_level_result_serialization: new round-trip test covering both the None and Some cases of unlocked_level and duration_ms, verifying skip_serializing_if behavior and the u64 wire shape for duration_ms. - test_adventure_event_serialization: new round-trip test that also exercises an embedded GridCell with is_hole = true so the grid-inside-message case stays wire-compatible. All 51 tests in the protocol crate pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 44021a4 - Browse repository at this point
Copy the full SHA 44021a4View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...adventure-mode