diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-28 23:19:52 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-28 23:19:52 +0100 |
| commit | 2915d826f744612e0d975282f5bddf13270b9f3f (patch) | |
| tree | a2864bfaef91070ac3b4e13b8b731e539a757cc8 /src/client/games/manager.rs | |
| parent | v1.0.0: replace slots with 5x3 reels and five paylines (diff) | |
| download | zagan-bet-2915d826f744612e0d975282f5bddf13270b9f3f.tar.gz zagan-bet-2915d826f744612e0d975282f5bddf13270b9f3f.zip | |
v1.1.0: highlight winning symbols on the slots board
Diffstat (limited to 'src/client/games/manager.rs')
| -rw-r--r-- | src/client/games/manager.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/games/manager.rs b/src/client/games/manager.rs index 8436142..168c49d 100644 --- a/src/client/games/manager.rs +++ b/src/client/games/manager.rs | |||
| @@ -76,6 +76,7 @@ impl GameManager { | |||
| 76 | session.data.remove("reels"); | 76 | session.data.remove("reels"); |
| 77 | session.data.remove("win_type"); | 77 | session.data.remove("win_type"); |
| 78 | session.data.remove("win_lines"); | 78 | session.data.remove("win_lines"); |
| 79 | session.data.remove("win_cells"); | ||
| 79 | session.data.remove("winnings"); | 80 | session.data.remove("winnings"); |
| 80 | Ok(()) | 81 | Ok(()) |
| 81 | } | 82 | } |
| @@ -101,6 +102,15 @@ impl GameManager { | |||
| 101 | .collect::<Vec<_>>() | 102 | .collect::<Vec<_>>() |
| 102 | .join(","), | 103 | .join(","), |
| 103 | ); | 104 | ); |
| 105 | session.data.insert( | ||
| 106 | "win_cells".to_string(), | ||
| 107 | result | ||
| 108 | .win_cells | ||
| 109 | .iter() | ||
| 110 | .map(usize::to_string) | ||
| 111 | .collect::<Vec<_>>() | ||
| 112 | .join(","), | ||
| 113 | ); | ||
| 104 | session | 114 | session |
| 105 | .data | 115 | .data |
| 106 | .insert("winnings".to_string(), result.winnings.to_string()); | 116 | .insert("winnings".to_string(), result.winnings.to_string()); |
| @@ -118,6 +128,7 @@ impl GameManager { | |||
| 118 | session.data.remove("reels"); | 128 | session.data.remove("reels"); |
| 119 | session.data.remove("win_type"); | 129 | session.data.remove("win_type"); |
| 120 | session.data.remove("win_lines"); | 130 | session.data.remove("win_lines"); |
| 131 | session.data.remove("win_cells"); | ||
| 121 | session.data.remove("winnings"); | 132 | session.data.remove("winnings"); |
| 122 | session.data.insert("error".to_string(), message.into()); | 133 | session.data.insert("error".to_string(), message.into()); |
| 123 | } | 134 | } |
