From 50fdaa8e5ad9454e783f01e2c369767834120d11 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 1 Nov 2026 18:08:38 +0100 Subject: v4.0.3: lobby and history screens behind commands --- src/client/view.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/client/view.rs') diff --git a/src/client/view.rs b/src/client/view.rs index 77efec6..903403c 100644 --- a/src/client/view.rs +++ b/src/client/view.rs @@ -241,9 +241,26 @@ impl CrashView { } } +/// The lobby: who is logged in, the balance, and what can be played. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct LobbyView { + pub connected: bool, + pub user: Option, + pub balance: Option, + pub games: Vec<(String, String)>, +} + +/// The play log, already parsed. +#[derive(Debug, Clone, PartialEq)] +pub struct HistoryView { + pub records: Vec, +} + /// Everything a frontend can draw. #[derive(Debug, Clone, PartialEq)] pub enum View { + Lobby(LobbyView), + History(HistoryView), Slots(SlotsView), Roulette(RouletteView), Blackjack(BlackjackView), @@ -253,6 +270,10 @@ pub enum View { /// Semantic input. Frontends turn keys and clicks into these. #[derive(Debug, Clone, PartialEq, Eq)] pub enum Command { + Play { game: String, bet: Option }, + History { limit: u32 }, + ShowLobby, + Logout, SetBet(u64), AdjustBet(i64), Leave, -- cgit v1.2.3