From 13db3e50cb6e29eedbf25416e5284bf08b0adefb Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 24 Sep 2026 20:06:41 -0400 Subject: feat: casino table ux: aliases, rebet hints, deadline notifications, spectator mode --- internal/casino/baccarat_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'internal/casino/baccarat_test.go') diff --git a/internal/casino/baccarat_test.go b/internal/casino/baccarat_test.go index 49e8fdd..12dc07c 100644 --- a/internal/casino/baccarat_test.go +++ b/internal/casino/baccarat_test.go @@ -1,6 +1,7 @@ package casino import ( + "strings" "testing" ) @@ -266,7 +267,7 @@ func TestBaccaratTiePushesAndPaysJackpotColor(t *testing.T) { t.Fatalf("payouts alice=%d bob=%d, want 100 (push)/900 (8:1)", wa.paid, wb.paid) } for _, event := range events { - if event.PrivateTo == "bob" && event.PrivateMessage == "You win! +900 credits" && event.Color != "casino_jackpot_win" { + if event.PrivateTo == "bob" && strings.Contains(event.PrivateMessage, "WIN | Net +800 credits | 900 returned") && event.Color != "casino_jackpot_win" { t.Fatalf("tie win color=%q, want casino_jackpot_win", event.Color) } } @@ -354,10 +355,10 @@ func TestBaccaratMenuAndActions(t *testing.T) { menu = event.Menu } } - if menu == nil || !menu.ShowBalance || menu.Heading != "New baccarat hand! Place your bet." { + if menu == nil || !menu.ShowBalance || !strings.Contains(menu.Heading, "Baccarat / Commission | Next hand | Limits") { t.Fatalf("join menu=%+v, want a baccarat betting menu", menu) } - if len(menu.Commands) != 3 || menu.Commands[0].Command != "bet " || menu.Commands[2].Command != "stop" { + if len(menu.Commands) != 4 || menu.Commands[0].Command != "bet 1 banker" || menu.Commands[2].Command != "stop" { t.Fatalf("baccarat menu commands=%+v", menu.Commands) } if events := table.action("alice", "hit"); !hasMessage(events, "no player actions") { -- cgit v1.2.3