From 80d9aa13251f7f5c3d3eeaa877bc79dac4435341 Mon Sep 17 00:00:00 2001 From: salmonik Date: Thu, 29 Oct 2026 23:08:25 +0100 Subject: PLN changed to Kromer --- src/client/games/blackjack.rs | 10 +++++----- src/client/games/crash.rs | 6 +++--- src/client/games/roulette.rs | 25 ++++++++++++++----------- src/client/games/slots.rs | 10 +++++----- 4 files changed, 27 insertions(+), 24 deletions(-) (limited to 'src/client/games') diff --git a/src/client/games/blackjack.rs b/src/client/games/blackjack.rs index d5f45b3..8fa5693 100644 --- a/src/client/games/blackjack.rs +++ b/src/client/games/blackjack.rs @@ -1,5 +1,5 @@ use super::traits::{Game, GameState}; -use crate::blackjack::{card_label, BlackjackState}; +use crate::blackjack::{BlackjackState, card_label}; pub const BLACKJACK_BOARD_LINES: usize = 6; @@ -33,8 +33,8 @@ impl BlackjackGame { fn result_text(result: &str, winnings: u64) -> String { match result { - "blackjack" => format!("BLACKJACK! Won {winnings} PLN"), - "win" => format!("Win! Won {winnings} PLN"), + "blackjack" => format!("BLACKJACK! Won {winnings} Kr"), + "win" => format!("Win! Won {winnings} Kr"), "push" => "Push. Bet returned.".to_string(), "lose" => "Dealer wins.".to_string(), "bust" => "Bust.".to_string(), @@ -65,7 +65,7 @@ impl Game for BlackjackGame { .map(|hand| hand.bet) .unwrap_or(state.bet_amount); return format!( - "=== BLACKJACK ===\r\nBalance: {balance} PLN Bet: {bet} PLN\r\n\r\n\r\nERROR: {error}\r\n[Q] Quit" + "=== BLACKJACK ===\r\nBalance: {balance} Kr Bet: {bet} Kr\r\n\r\n\r\nERROR: {error}\r\n[Q] Quit" ); } @@ -120,7 +120,7 @@ impl Game for BlackjackGame { }; format!( - "=== BLACKJACK ===\r\nBalance: {} PLN Bet: {} PLN\r\nDealer: {} {}\r\nYou: {} {}\r\n{}\r\n{}", + "=== BLACKJACK ===\r\nBalance: {} Kr Bet: {} Kr\r\nDealer: {} {}\r\nYou: {} {}\r\n{}\r\n{}", balance, bet, dealer, dealer_total, player, player_total, text, controls ) } diff --git a/src/client/games/crash.rs b/src/client/games/crash.rs index 19733f2..383e807 100644 --- a/src/client/games/crash.rs +++ b/src/client/games/crash.rs @@ -19,7 +19,7 @@ impl CrashGame { "starting" => "Starting...".to_string(), "running" => "Rising... cash out before it crashes.".to_string(), "cashed" => format!( - "Cashed out at {}x Won {} PLN", + "Cashed out at {}x Won {} Kr", Self::value(state, "multiplier").unwrap_or("1.00"), Self::value(state, "payout").unwrap_or("0") ), @@ -55,13 +55,13 @@ impl Game for CrashGame { if let Some(error) = Self::value(state, "error") { return format!( - "=== CRASH ===\r\nBalance: {balance} PLN Bet: {} PLN\r\n\r\nERROR: {error}\r\n\r\n[SPACE] Play [+/=/-] Bet [Q] Quit", + "=== CRASH ===\r\nBalance: {balance} Kr Bet: {} Kr\r\n\r\nERROR: {error}\r\n\r\n[SPACE] Play [+/=/-] Bet [Q] Quit", state.bet_amount ); } format!( - "=== CRASH ===\r\nBalance: {} PLN Bet: {} PLN\r\nMultiplier: {}x\r\nPotential: {} PLN\r\n{}\r\n{}", + "=== CRASH ===\r\nBalance: {} Kr Bet: {} Kr\r\nMultiplier: {}x\r\nPotential: {} Kr\r\n{}\r\n{}", balance, state.bet_amount, multiplier, diff --git a/src/client/games/roulette.rs b/src/client/games/roulette.rs index 3cb1c58..96f8791 100644 --- a/src/client/games/roulette.rs +++ b/src/client/games/roulette.rs @@ -1,5 +1,5 @@ use super::traits::{Game, GameState}; -use crate::roulette::{is_even, is_odd, BetTarget, Bets, Outside}; +use crate::roulette::{BetTarget, Bets, Outside, is_even, is_odd}; pub const ROULETTE_BOARD_LINES: usize = 12; @@ -96,7 +96,9 @@ impl Cursor { /// Numbers the cursor would cover, for highlighting the felt. pub fn numbers(&self) -> Vec { - self.target().map(|target| target.numbers()).unwrap_or_default() + self.target() + .map(|target| target.numbers()) + .unwrap_or_default() } pub fn moved(&self, direction: Direction) -> Cursor { @@ -130,9 +132,7 @@ impl Cursor { (Cursor::Column(index), Direction::Up) => Cursor::Dozen(index), (Cursor::Column(index), Direction::Down) => Cursor::Outside(index * 2), - (Cursor::Outside(index), Direction::Left) => { - Cursor::Outside(index.saturating_sub(1)) - } + (Cursor::Outside(index), Direction::Left) => Cursor::Outside(index.saturating_sub(1)), (Cursor::Outside(index), Direction::Right) => { Cursor::Outside((index + 1).min(OUTSIDE_ORDER.len() - 1)) } @@ -249,7 +249,11 @@ impl RouletteGame { .iter() .enumerate() .map(|(index, kind)| { - Self::wide_cell(kind.label(), OUTSIDE_WIDTH, cursor == Cursor::Outside(index)) + Self::wide_cell( + kind.label(), + OUTSIDE_WIDTH, + cursor == Cursor::Outside(index), + ) }) .collect() } @@ -268,7 +272,7 @@ impl RouletteGame { if list.chars().count() > 40 { list = list.chars().take(39).collect::() + "…"; } - format!("Bets: {list} Total: {} PLN", bets.total()) + format!("Bets: {list} Total: {} Kr", bets.total()) } fn status_line(state: &GameState) -> String { @@ -309,7 +313,7 @@ impl RouletteGame { format!("No win at {number} {color}{parity}") } else { let profit = winnings.parse::().unwrap_or(0).saturating_sub(stake); - format!("Won {winnings} PLN at {number} {color}{parity} (+{profit})") + format!("Won {winnings} Kr at {number} {color}{parity} (+{profit})") } } Some("spinning") => "Spinning...".to_string(), @@ -332,7 +336,7 @@ impl Game for RouletteGame { let lines = [ "=== ROULETTE ===".to_string(), - format!("Balance: {balance} PLN Chip: {chip} PLN"), + format!("Balance: {balance} Kr Chip: {chip} Kr"), Self::zero_cell(cursor), Self::number_row(0, &covered), Self::number_row(1, &covered), @@ -342,8 +346,7 @@ impl Game for RouletteGame { Self::outside_row(cursor), Self::bets_line(&bets), Self::status_line(state), - "[ARROWS] Move [ENTER] Bet [C]lear [+/-] Chip [SPACE] Spin [Q] Quit" - .to_string(), + "[ARROWS] Move [ENTER] Bet [C]lear [+/-] Chip [SPACE] Spin [Q] Quit".to_string(), ]; lines.join("\r\n") } diff --git a/src/client/games/slots.rs b/src/client/games/slots.rs index 2ec354e..5bffc4c 100644 --- a/src/client/games/slots.rs +++ b/src/client/games/slots.rs @@ -1,5 +1,5 @@ use super::traits::{Game, GamePhase, GameState}; -use crate::slots::{paytable_lines, LINE_NAMES, REELS, ROWS}; +use crate::slots::{LINE_NAMES, REELS, ROWS, paytable_lines}; /// Height of the game board. It must never depend on the spin result. pub const SLOT_BOARD_LINES: usize = 10; @@ -65,9 +65,9 @@ impl SlotsGame { .unwrap_or("0"); if winnings != "0" { return match state.data.get("win_type").map(String::as_str) { - Some("mega") => format!("MEGA WIN! {winnings} PLN"), - Some("big") => format!("BIG WIN! {winnings} PLN"), - _ => format!("Won {winnings} PLN"), + Some("mega") => format!("MEGA WIN! {winnings} Kr"), + Some("big") => format!("BIG WIN! {winnings} Kr"), + _ => format!("Won {winnings} Kr"), }; } return "No win.".to_string(); @@ -115,7 +115,7 @@ impl Game for SlotsGame { let paytable = paytable_lines(); format!( - "=== SLOTS ===\r\nBet: {} PLN Balance: {} PLN\r\n{}\r\n{}\r\n{}\r\n{}\r\n{}\r\n{}\r\n{}\r\n[+/-] Bet [SPACE] Spin [Q] Quit", + "=== SLOTS ===\r\nBet: {} Kr Balance: {} Kr\r\n{}\r\n{}\r\n{}\r\n{}\r\n{}\r\n{}\r\n{}\r\n[+/-] Bet [SPACE] Spin [Q] Quit", state.bet_amount, balance, grid[0], -- cgit v1.2.3