summaryrefslogtreecommitdiffstats
path: root/src/slots.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/slots.rs')
-rw-r--r--src/slots.rs18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/slots.rs b/src/slots.rs
index 561c449..a3b4ef4 100644
--- a/src/slots.rs
+++ b/src/slots.rs
@@ -23,11 +23,23 @@ pub const PAYTABLE: [(char, u64, u64, u64); 6] = [
23 ('S', 9, 30, 150), 23 ('S', 9, 30, 150),
24]; 24];
25 25
26/// One-line paytable rendered under the reels. 26/// Paytable rendered under the reels, split so it fits a narrow terminal.
27pub fn paytable_line() -> String { 27pub fn paytable_lines() -> Vec<String> {
28 let entries: Vec<String> = PAYTABLE 28 let entries: Vec<String> = PAYTABLE
29 .iter() 29 .iter()
30 .map(|(symbol, three, four, five)| format!("{symbol} {three}/{four}/{five}")) 30 .map(|(symbol, three, four, five)| format!("{symbol} {three}/{four}/{five}"))
31 .collect(); 31 .collect();
32 format!("Pays 3/4/5 x bet: {}", entries.join(" ")) 32
33 entries
34 .chunks(3)
35 .enumerate()
36 .map(|(index, chunk)| {
37 let prefix = if index == 0 {
38 "Pays 3/4/5 x bet: "
39 } else {
40 ""
41 };
42 format!("{}{}", prefix, chunk.join(" "))
43 })
44 .collect()
33} 45}