From 93dcb67ffee05ebf1de0c9a78a8b906eaf161007 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sun, 4 Oct 2026 17:44:27 -0400 Subject: feat: new casino game: cash hunt, fixed verb issue with pai gow --- internal/game/pai_gow_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'internal/game/pai_gow_test.go') diff --git a/internal/game/pai_gow_test.go b/internal/game/pai_gow_test.go index 830b080..35aee4e 100644 --- a/internal/game/pai_gow_test.go +++ b/internal/game/pai_gow_test.go @@ -416,3 +416,23 @@ func TestPaiGowStopMidRoundQueuesDeparture(t *testing.T) { t.Fatal("queued stop did not leave after the round") } } + +func TestPaiGowSeatedVerbsReachGame(t *testing.T) { + // house/set are not shared-registry verbs; a seated player must still be + // able to type them instead of getting "Unknown command". + g, sess, conn := casinoCrapsGame(t, "name: Pai Gow\ncasino_tables:\n - id: fortune\n game: paigow\n") + g.executePlay(sess, []string{"pai"}, "play pai") + g.executeBet(sess, []string{"5", "fortune"}, "bet 5 fortune") + g.executeBet(sess, []string{"20"}, "bet 20") + for _, verb := range []string{"house", "set"} { + conn.data = nil + g.handleGameCommand(sess, verb) + if strings.Contains(string(conn.data), "Unknown command") { + t.Fatalf("%s was rejected before reaching Pai Gow: %s", verb, conn.data) + } + } + table, _ := g.Casino.Participation(sess.Player.Name) + if table.Status(sess.Player.Name)[0].Snapshot.(*casino.PaiGowSnapshot).Phase != "waiting" { + t.Fatal("house/set did not finish the hand") + } +} -- cgit v1.2.3