From 49df948de25d28601469e9ca993f33530989ebd0 Mon Sep 17 00:00:00 2001 From: salmonik Date: Thu, 29 Oct 2026 22:55:49 +0100 Subject: v3.0.0: cursor-driven roulette felt with splits and corners; drop schema migrations; require 80x24 --- src/client/games/manager.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/client/games/manager.rs') diff --git a/src/client/games/manager.rs b/src/client/games/manager.rs index b20ff44..bb2a8b5 100644 --- a/src/client/games/manager.rs +++ b/src/client/games/manager.rs @@ -55,7 +55,7 @@ impl GameManager { ); data.insert("chip".to_string(), "10".to_string()); data.insert("status".to_string(), "place".to_string()); - data.insert("number_input".to_string(), String::new()); + data.insert("cursor".to_string(), "lattice:0:3".to_string()); 0 } else if game_type == "blackjack" { data.insert("status".to_string(), "ready".to_string()); @@ -234,11 +234,19 @@ impl GameManager { } } - pub fn set_roulette_number_input(&mut self, value: &str) { + pub fn roulette_cursor(&self) -> crate::client::games::roulette::Cursor { + self.current_session + .as_ref() + .and_then(|session| session.data.get("cursor")) + .map(|raw| crate::client::games::roulette::Cursor::parse(raw)) + .unwrap_or_default() + } + + pub fn set_roulette_cursor(&mut self, cursor: &crate::client::games::roulette::Cursor) { if let Some(session) = self.current_session.as_mut() { session .data - .insert("number_input".to_string(), value.to_string()); + .insert("cursor".to_string(), cursor.encoded()); } } @@ -274,9 +282,6 @@ impl GameManager { session .data .insert("status".to_string(), "result".to_string()); - session - .data - .insert("number_input".to_string(), String::new()); } pub fn apply_blackjack_state(&mut self, state: BlackjackState) { -- cgit v1.2.3