From 9951e2d5afbcabb4bd8016b6d160653c1ec5ed8e Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 28 Oct 2026 23:45:43 +0100 Subject: v1.3.0: simplify payouts to bet x symbol x shape --- tests/client_core.rs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'tests/client_core.rs') diff --git a/tests/client_core.rs b/tests/client_core.rs index e75a611..fd88566 100644 --- a/tests/client_core.rs +++ b/tests/client_core.rs @@ -135,8 +135,9 @@ fn play_shows_a_ten_line_board_and_fetches_the_balance() { assert_eq!(h.board().len(), 10); assert!(h.board()[1].contains("Bet: 50 PLN")); assert!(!h.board()[1].contains("Lines:")); - assert!(h.board()[5].contains("Pays 3/4/5 x bet:")); - assert!(h.board()[6].contains("G 4/12/40 D 6/18/70 S 9/30/150")); + assert!(h.board()[5].contains("Pays bet x symbol x shape")); + assert!(h.board()[6].contains("Symbol C1 L2 O3 G4 D6 S10")); + assert!(h.board()[6].contains("Shape 3:1 4:3 5:14")); assert!(h.sent.contains(&"INFO".to_string())); h.reply("INFO alice 1 1000"); @@ -157,15 +158,15 @@ fn spin_replaces_the_board_and_keeps_the_controls_line() { assert!(h.sent.iter().any(|line| line == "PLAY_START slots 50")); assert_eq!(h.screen.lines.len(), lines_before_spin); - h.reply("GAME_RESULT session-1 100 50 1050 CCCCLLCLODGSDGS win 1 0,3,6"); + h.reply("GAME_RESULT session-1 50 50 1000 CCCCLLCLODGSDGS win 1 0,3,6"); assert_eq!(h.board().len(), 10); assert!(h .board() .get(2) .is_some_and(|line| line.contains("{ C } { C } { C } [ D ] [ D ]"))); - assert!(h.board()[7].contains("Won 100 PLN")); - assert!(h.board()[8].contains("Winning lines: 1")); - assert!(h.board()[1].contains("Balance: 1050 PLN")); + assert!(h.board()[7].contains("Won 50 PLN")); + assert!(h.board()[8].contains("Winning lines: 1 (top)")); + assert!(h.board()[1].contains("Balance: 1000 PLN")); assert!(h.board()[9].contains("[Q] Quit")); assert_eq!(h.screen.lines.len(), lines_before_spin); } @@ -175,7 +176,7 @@ fn changing_the_bet_after_a_spin_does_not_leave_stale_lines() { let mut h = Harness::new(); h.enter_slots("50"); h.key(Key::Char(' ')); - h.reply("GAME_RESULT session-1 100 50 1050 CCCCLLCLODGSDGS win 1 0,3,6"); + h.reply("GAME_RESULT session-1 50 50 1000 CCCCLLCLODGSDGS win 1 0,3,6"); let lines_before_bet = h.screen.lines.len(); h.key(Key::Char('+')); @@ -217,11 +218,11 @@ fn a_mega_win_shows_all_winning_lines() { h.enter_slots("10"); h.key(Key::Char(' ')); - h.reply(&format!("GAME_RESULT session-1 750 10 1740 {ALL_C} mega 1,2,3,4,5 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14")); + h.reply(&format!("GAME_RESULT session-1 700 10 1690 {ALL_C} mega 1,2,3,4,5 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14")); assert_eq!(h.board().len(), 10); - assert!(h.board()[7].contains("MEGA WIN! 750 PLN")); - assert!(h.board()[8].contains("Winning lines: 1,2,3,4,5")); + assert!(h.board()[7].contains("MEGA WIN! 700 PLN")); + assert!(h.board()[8].contains("Winning lines: 1 (top), 2 (middle), 3 (bottom), 4 (V), 5 (inverted V)")); assert_eq!(h.board()[2].matches("{ C }").count(), 5); } @@ -521,7 +522,7 @@ fn disconnect_clears_connection_state() { #[test] fn parses_a_five_by_three_result_with_winning_lines() { - let response = format!("GAME_RESULT session-1 100 50 1050 {WIN3} win 1 0,3,6"); + let response = format!("GAME_RESULT session-1 50 50 1000 {WIN3} win 1 0,3,6"); let result = parse_spin_response(&response).expect("valid 5x3 result"); assert_eq!(result.reels.chars().count(), 15); -- cgit v1.2.3