diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-29 22:16:15 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-29 22:16:15 +0100 |
| commit | bc0de9955c375cf27d52c9934403964205afc182 (patch) | |
| tree | 42799fb426fb0ec164f44c92a63525003c582f35 /src/roulette.rs | |
| parent | initial connection timeout set to 10s (diff) | |
| download | zagan-bet-bc0de9955c375cf27d52c9934403964205afc182.tar.gz zagan-bet-bc0de9955c375cf27d52c9934403964205afc182.zip | |
formatting
Diffstat (limited to '')
| -rw-r--r-- | src/roulette.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/roulette.rs b/src/roulette.rs index b59f92e..426ecc3 100644 --- a/src/roulette.rs +++ b/src/roulette.rs | |||
| @@ -4,8 +4,8 @@ use serde::{Deserialize, Serialize}; | |||
| 4 | 4 | ||
| 5 | /// European wheel clockwise from zero. | 5 | /// European wheel clockwise from zero. |
| 6 | pub const WHEEL: [u8; 37] = [ | 6 | pub const WHEEL: [u8; 37] = [ |
| 7 | 0, 32, 15, 19, 4, 21, 2, 25, 17, 34, 6, 27, 13, 36, 11, 30, 8, 23, 10, 5, | 7 | 0, 32, 15, 19, 4, 21, 2, 25, 17, 34, 6, 27, 13, 36, 11, 30, 8, 23, 10, 5, 24, 16, 33, 1, 20, |
| 8 | 24, 16, 33, 1, 20, 14, 31, 9, 22, 18, 29, 7, 28, 12, 35, 3, 26, | 8 | 14, 31, 9, 22, 18, 29, 7, 28, 12, 35, 3, 26, |
| 9 | ]; | 9 | ]; |
| 10 | 10 | ||
| 11 | pub const RED_NUMBERS: [u8; 18] = [ | 11 | pub const RED_NUMBERS: [u8; 18] = [ |
| @@ -92,8 +92,7 @@ impl Bets { | |||
| 92 | if is_red(number) { | 92 | if is_red(number) { |
| 93 | winnings = winnings.saturating_add(self.red.saturating_mul(EVEN_MONEY_RETURN)); | 93 | winnings = winnings.saturating_add(self.red.saturating_mul(EVEN_MONEY_RETURN)); |
| 94 | } else { | 94 | } else { |
| 95 | winnings = | 95 | winnings = winnings.saturating_add(self.black.saturating_mul(EVEN_MONEY_RETURN)); |
| 96 | winnings.saturating_add(self.black.saturating_mul(EVEN_MONEY_RETURN)); | ||
| 97 | } | 96 | } |
| 98 | if is_even(number) { | 97 | if is_even(number) { |
| 99 | winnings = winnings.saturating_add(self.even.saturating_mul(EVEN_MONEY_RETURN)); | 98 | winnings = winnings.saturating_add(self.even.saturating_mul(EVEN_MONEY_RETURN)); |
| @@ -104,8 +103,7 @@ impl Bets { | |||
| 104 | 103 | ||
| 105 | for bet in &self.numbers { | 104 | for bet in &self.numbers { |
| 106 | if bet.number == number { | 105 | if bet.number == number { |
| 107 | winnings = winnings | 106 | winnings = winnings.saturating_add(bet.amount.saturating_mul(STRAIGHT_RETURN)); |
| 108 | .saturating_add(bet.amount.saturating_mul(STRAIGHT_RETURN)); | ||
| 109 | } | 107 | } |
| 110 | } | 108 | } |
| 111 | 109 | ||
