From bf4cf78ab26896faf457273e37d30fc96381c4a4 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 1 Nov 2026 21:09:56 +0100 Subject: v4.2.0: wire the GUI to the core, transport and all four games Phase 4. The egui frontend now shares ClientCore and the client database with the terminal: one background worker owns TLS, trust answers go through a channel, and a 10 s request deadline mirrors the terminal socket timeout. First contact, a changed key and a version mismatch are explicit screens; login can remember the credential and auto-login signs in before the login form appears. Adds the lobby with an update notice, a full-width scrollable history table, and the four games painted from View: slots with reel animation and win lines that stop at the last matching reel, roulette with the hover lattice and wheel spin, blackjack with vector-drawn suits, and a smooth crash curve. Sidebars pin their action block; leaving a live hand or round asks before forfeiting. The header balance holds the staked amount while the reels or wheel turn and only shows the payout when they stop. Refused spins cancel the animation. Live crash multipliers keep full precision for the chart; the terminal still displays two decimals. Verified live against a 4.2.0 server: register, login, auto-login, trust, all four games settling, history (50 rows), logout, disconnect, forfeit confirmation, and the version-mismatch screen. Release: 8.3 MB Linux, 6.8 MB Windows, 61 ms to window, 131 MB idle RSS. --- src/client/games/manager.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/client/games') diff --git a/src/client/games/manager.rs b/src/client/games/manager.rs index bb2a8b5..24ceeaa 100644 --- a/src/client/games/manager.rs +++ b/src/client/games/manager.rs @@ -353,7 +353,7 @@ impl GameManager { .insert("balance".to_string(), state.balance.to_string()); session .data - .insert("multiplier".to_string(), format!("{:.2}", state.multiplier)); + .insert("multiplier".to_string(), state.multiplier.to_string()); session .data .insert("potential".to_string(), state.potential.to_string()); @@ -373,9 +373,11 @@ impl GameManager { return; }; let bet = session.bet_amount; + // Keep the full value: the terminal rounds for display, but the GUI + // charts it and must not draw a staircase. session .data - .insert("multiplier".to_string(), format!("{multiplier:.2}")); + .insert("multiplier".to_string(), multiplier.to_string()); session .data .insert("potential".to_string(), payout(bet, multiplier).to_string()); -- cgit v1.2.3