status bar display

This commit is contained in:
2026-06-21 12:32:09 -05:00
parent a45c5a0a68
commit 9b53552f4a
7 changed files with 126 additions and 9 deletions
+10
View File
@@ -66,6 +66,14 @@ pub struct GameState {
/// by [`enter_board`](GameState::enter_board). Front-ends tick this down and
/// may block input or show a visual effect while it is `Some(t)` where `t > 0`.
pub board_transition: Option<f64>,
/// The player's current health. Game-global (not per-board), so it persists
/// across board transitions. Players start with `5`. There is no runtime
/// mutation path yet — front-ends only display it.
pub player_health: u32,
/// The number of gems the player has collected. Game-global like
/// [`player_health`](GameState::player_health); starts at `0` and is
/// display-only for now.
pub player_gems: u32,
}
impl GameState {
@@ -92,6 +100,8 @@ impl GameState {
speech_bubbles: Vec::new(),
active_scroll: None,
board_transition: None,
player_health: 5,
player_gems: 0,
};
state.drain_errors();
state