This document contains a comprehensive test matrix for 4-player poker scenarios covering all action combinations, betting rounds, rake scenarios, side pots, multi-way ties, kicker requirements, and dealer/blind rotation across multiple hands.
Each test scenario includes:
- Test ID: Unique identifier
- Description: Scenario description
- Betting Round: PRE_FLOP, FLOP, TURN, or RIVER
- Seat Positions: Dealer (D), Small Blind (SB), Big Blind (BB), Under the Gun (UTG)
- Actions: Sequence of actions taken by each seat
- Expected Outcome: Hand end status, winner(s), pot amounts, side pot distribution
- Rake Scenarios: Tested at both 0 bps and 700 bps
- FOLD: Player folds, hand continues with remaining players
- CHECK: Player checks (only if no current bet)
- CALL: Player matches current bet
- BET: Player bets (first bet in round)
- RAISE: Player raises (increases existing bet)
- ALL_IN: Player commits all chips
- PRE_FLOP: Before community cards
- FLOP: After 3 community cards
- TURN: After 4 community cards
- RIVER: After 5 community cards (final round)
- Seat 0: Dealer (D) - First hand
- Seat 1: Small Blind (SB) - First hand
- Seat 2: Big Blind (BB) - First hand
- Seat 3: Under the Gun (UTG) - First hand, acts first pre-flop
After each hand, positions rotate:
- Hand 1: D=0, SB=1, BB=2, UTG=3
- Hand 2: D=1, SB=2, BB=3, UTG=0
- Hand 3: D=2, SB=3, BB=0, UTG=1
- Hand 4: D=3, SB=0, BB=1, UTG=2
- Hand 5: D=0, SB=1, BB=2, UTG=3 (cycle repeats)
Description: UTG folds immediately, action continues
- Actions:
- Seat 1: POST_BLIND (1M)
- Seat 2: POST_BLIND (2M)
- Seat 3: FOLD (UTG)
- Seat 0: Action (varies by scenario)
- Expected Outcome:
- Hand continues with 3 players
- Pot before rake: 3M (1M + 2M)
- Rake not deducted until hand ends
Description: UTG and Dealer fold, only SB and BB remain
- Actions:
- Seat 1: POST_BLIND (1M)
- Seat 2: POST_BLIND (2M)
- Seat 3: FOLD
- Seat 0: FOLD
- Expected Outcome:
- Hand continues with 2 players (SB and BB)
- Pot before rake: 3M
- Round may advance to FLOP if both call/check
Description: All players call big blind, no raises
- Actions:
- Seat 1: POST_BLIND (1M)
- Seat 2: POST_BLIND (2M)
- Seat 3: CALL (2M to match)
- Seat 0: CALL (2M to match)
- Seat 1: CALL (1M to match)
- Expected Outcome:
- Round advances to FLOP
- Pot before rake: 8M (1M + 2M + 2M + 2M + 1M)
- All 4 players active
Description: UTG raises, all others call
- Actions:
- Seat 1: POST_BLIND (1M)
- Seat 2: POST_BLIND (2M)
- Seat 3: RAISE (to 5M total, 3M incremental)
- Seat 0: CALL (5M to match)
- Seat 1: CALL (4M to match)
- Seat 2: CALL (3M to match)
- Expected Outcome:
- Round advances to FLOP
- Pot before rake: 20M (1M + 2M + 3M + 5M + 4M + 3M)
- All 4 players active
Description: UTG raises, some players fold
- Actions:
- Seat 1: POST_BLIND (1M)
- Seat 2: POST_BLIND (2M)
- Seat 3: RAISE (to 5M total, 3M incremental)
- Seat 0: FOLD
- Seat 1: CALL (4M to match)
- Seat 2: CALL (3M to match)
- Expected Outcome:
- Round advances to FLOP with 3 players
- Pot before rake: 15M (1M + 2M + 3M + 4M + 3M)
Description: UTG raises, BB re-raises, others call/fold
- Actions:
- Seat 1: POST_BLIND (1M)
- Seat 2: POST_BLIND (2M)
- Seat 3: RAISE (to 5M total, 3M incremental)
- Seat 0: CALL (5M to match)
- Seat 1: CALL (4M to match)
- Seat 2: RAISE (to 10M total, 8M incremental)
- Seat 3: CALL (5M to match)
- Seat 0: CALL (5M to match)
- Seat 1: CALL (5M to match)
- Expected Outcome:
- Round advances to FLOP
- Pot before rake: 40M (1M + 2M + 3M + 5M + 4M + 8M + 5M + 5M + 5M)
Description: UTG raises, BB re-raises, UTG re-raises again
- Actions:
- Seat 1: POST_BLIND (1M)
- Seat 2: POST_BLIND (2M)
- Seat 3: RAISE (to 5M total, 3M incremental)
- Seat 0: FOLD
- Seat 1: FOLD
- Seat 2: RAISE (to 10M total, 8M incremental)
- Seat 3: RAISE (to 20M total, 15M incremental)
- Seat 2: CALL (10M to match)
- Expected Outcome:
- Round advances to FLOP with 2 players
- Pot before rake: 30M (1M + 2M + 3M + 8M + 15M + 10M)
Description: One player goes all-in, others call/fold
- Actions:
- Seat 1: POST_BLIND (1M)
- Seat 2: POST_BLIND (2M)
- Seat 3: ALL_IN (50M total, 48M incremental)
- Seat 0: CALL (48M to match)
- Seat 1: FOLD
- Seat 2: CALL (48M to match)
- Expected Outcome:
- Both players all-in, auto-advance to RIVER
- Hand ends via showdown
- Pot before rake: 50M (1M + 2M + 48M + 48M + 48M)
- Rake (0 bps): 0
- Rake (700 bps): 3,500,000
Description: Two players go all-in for same amount
- Actions:
- Seat 1: POST_BLIND (1M)
- Seat 2: POST_BLIND (2M)
- Seat 3: ALL_IN (50M total, 48M incremental)
- Seat 0: FOLD
- Seat 1: FOLD
- Seat 2: ALL_IN (50M total, 48M incremental)
- Expected Outcome:
- Both players all-in, auto-advance to RIVER
- Hand ends via showdown
- Pot before rake: 50M (1M + 2M + 48M + 48M)
- Single pot (no side pot)
Description: Two players all-in for different amounts, creating side pot
- Actions:
- Seat 1: POST_BLIND (1M)
- Seat 2: POST_BLIND (2M)
- Seat 3: ALL_IN (30M total, 28M incremental)
- Seat 0: FOLD
- Seat 1: FOLD
- Seat 2: ALL_IN (50M total, 48M incremental)
- Expected Outcome:
- Both players all-in, side pot created
- Auto-advance to RIVER
- Main pot before rake: 60M (30M + 30M)
- Side pot before rake: 40M (20M + 20M)
- Total pot before rake: 100M
Description: Three players all-in creating multiple side pots
- Actions:
- Seat 1: POST_BLIND (1M)
- Seat 2: POST_BLIND (2M)
- Seat 3: ALL_IN (20M total, 18M incremental)
- Seat 0: ALL_IN (30M total, 28M incremental)
- Seat 1: FOLD
- Seat 2: ALL_IN (50M total, 48M incremental)
- Expected Outcome:
- Three players all-in, multiple side pots created
- Auto-advance to RIVER
- Pot 0 (main): 80M (20M × 4 players)
- Pot 1 (side): 40M (10M × 4 players, but only 2 eligible)
- Pot 2 (side): 40M (20M × 2 players)
- Total pot before rake: 160M
Description: All four players all-in for different amounts
- Actions:
- Seat 1: POST_BLIND (1M)
- Seat 2: POST_BLIND (2M)
- Seat 3: ALL_IN (20M total, 18M incremental)
- Seat 0: ALL_IN (30M total, 28M incremental)
- Seat 1: ALL_IN (40M total, 38M incremental)
- Seat 2: ALL_IN (50M total, 48M incremental)
- Expected Outcome:
- All players all-in, multiple side pots
- Auto-advance to RIVER
- Pot 0: 80M (20M × 4)
- Pot 1: 40M (10M × 4, but only 3 eligible)
- Pot 2: 30M (10M × 3, but only 2 eligible)
- Pot 3: 20M (10M × 2)
- Total pot before rake: 170M
Description: Three players all-in, one folds
- Actions:
- Seat 1: POST_BLIND (1M)
- Seat 2: POST_BLIND (2M)
- Seat 3: ALL_IN (30M total, 28M incremental)
- Seat 0: FOLD
- Seat 1: ALL_IN (40M total, 38M incremental)
- Seat 2: ALL_IN (50M total, 48M incremental)
- Expected Outcome:
- Three players all-in, side pots created
- Pot 0: 90M (30M × 3)
- Pot 1: 30M (10M × 3, but only 2 eligible)
- Pot 2: 20M (10M × 2)
- Total pot before rake: 140M
Description: Player all-in for less than required bet
- Actions:
- Seat 1: POST_BLIND (1M)
- Seat 2: POST_BLIND (2M)
- Seat 3: RAISE (to 10M total, 8M incremental)
- Seat 0: ALL_IN (5M total, 3M incremental - less than 10M)
- Seat 1: FOLD
- Seat 2: CALL (8M to match 10M)
- Seat 3: Action (can raise or call)
- Expected Outcome:
- Side pot created for difference
- Pot 0: 15M (5M × 3 players)
- Pot 1: 10M (5M × 2 players, only Seat 2 and Seat 3 eligible)
- Total pot before rake: 25M
Description: All four players check on flop
- Actions:
- PRE_FLOP: All call (no raises)
- FLOP: Seat 1 CHECK, Seat 2 CHECK, Seat 3 CHECK, Seat 0 CHECK
- Expected Outcome:
- Round advances to TURN
- Pot before rake: 8M (from PRE_FLOP)
- All 4 players active
Description: First player bets, all others call
- Actions:
- PRE_FLOP: All call
- FLOP: Seat 1 BET (5M), Seat 2 CALL (5M), Seat 3 CALL (5M), Seat 0 CALL (5M)
- Expected Outcome:
- Round advances to TURN
- Pot before rake: 28M (8M + 5M + 5M + 5M + 5M)
- All 4 players active
Description: Bet, one folds, others call
- Actions:
- PRE_FLOP: All call
- FLOP: Seat 1 BET (5M), Seat 2 CALL (5M), Seat 3 FOLD, Seat 0 CALL (5M)
- Expected Outcome:
- Round advances to TURN with 3 players
- Pot before rake: 23M (8M + 5M + 5M + 5M)
Description: Bet, raise, others call
- Actions:
- PRE_FLOP: All call
- FLOP: Seat 1 BET (5M), Seat 2 RAISE (to 15M total, 10M incremental), Seat 3 CALL (15M), Seat 0 CALL (15M), Seat 1 CALL (10M to match)
- Expected Outcome:
- Round advances to TURN
- Pot before rake: 58M (8M + 5M + 10M + 15M + 15M + 10M)
- All 4 players active
Description: Bet, raise, one folds, others call
- Actions:
- PRE_FLOP: All call
- FLOP: Seat 1 BET (5M), Seat 2 RAISE (to 15M total, 10M incremental), Seat 3 FOLD, Seat 0 CALL (15M), Seat 1 CALL (10M)
- Expected Outcome:
- Round advances to TURN with 3 players
- Pot before rake: 43M (8M + 5M + 10M + 15M + 10M)
Description: Check, bet, others call
- Actions:
- PRE_FLOP: All call
- FLOP: Seat 1 CHECK, Seat 2 CHECK, Seat 3 BET (5M), Seat 0 CALL (5M), Seat 1 CALL (5M), Seat 2 CALL (5M)
- Expected Outcome:
- Round advances to TURN
- Pot before rake: 28M (8M + 5M + 5M + 5M + 5M)
Description: Check, bet, raise, others call
- Actions:
- PRE_FLOP: All call
- FLOP: Seat 1 CHECK, Seat 2 CHECK, Seat 3 BET (5M), Seat 0 RAISE (to 15M total, 10M incremental), Seat 1 CALL (15M), Seat 2 CALL (15M), Seat 3 CALL (10M)
- Expected Outcome:
- Round advances to TURN
- Pot before rake: 58M (8M + 5M + 10M + 15M + 15M + 10M)
Description: One player all-in, others call/fold
- Actions:
- PRE_FLOP: All call
- FLOP: Seat 1 ALL_IN (50M total, 47M incremental), Seat 2 CALL (47M), Seat 3 CALL (47M), Seat 0 FOLD
- Expected Outcome:
- Three players all-in, auto-advance to RIVER
- Pot before rake: 50M (8M + 47M + 47M + 47M)
Description: Two players all-in for different amounts
- Actions:
- PRE_FLOP: All call
- FLOP: Seat 1 ALL_IN (30M total, 27M incremental), Seat 2 FOLD, Seat 3 ALL_IN (50M total, 47M incremental), Seat 0 FOLD
- Expected Outcome:
- Side pot created
- Pot 0: 60M (30M × 2)
- Pot 1: 40M (20M × 2)
- Total pot before rake: 100M
Description: Three players all-in creating multiple side pots
- Actions:
- PRE_FLOP: All call
- FLOP: Seat 1 ALL_IN (20M total, 17M incremental), Seat 2 ALL_IN (30M total, 27M incremental), Seat 3 ALL_IN (50M total, 47M incremental), Seat 0 FOLD
- Expected Outcome:
- Multiple side pots
- Pot 0: 80M (20M × 4, but only 3 eligible)
- Pot 1: 30M (10M × 3, but only 2 eligible)
- Pot 2: 40M (20M × 2)
- Total pot before rake: 150M
Description: All players check on turn
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: Seat 1 CHECK, Seat 2 CHECK, Seat 3 CHECK, Seat 0 CHECK
- Expected Outcome:
- Round advances to RIVER
- Pot before rake: 8M
Description: Bet, all call
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: Seat 1 BET (5M), Seat 2 CALL (5M), Seat 3 CALL (5M), Seat 0 CALL (5M)
- Expected Outcome:
- Round advances to RIVER
- Pot before rake: 28M (8M + 5M + 5M + 5M + 5M)
Description: Bet, raise, others call
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: Seat 1 BET (5M), Seat 2 RAISE (to 15M total, 10M incremental), Seat 3 CALL (15M), Seat 0 CALL (15M), Seat 1 CALL (10M)
- Expected Outcome:
- Round advances to RIVER
- Pot before rake: 58M (8M + 5M + 10M + 15M + 15M + 10M)
Description: Multiple players all-in on turn
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: Seat 1 ALL_IN (30M total, 27M incremental), Seat 2 ALL_IN (50M total, 47M incremental), Seat 3 FOLD, Seat 0 FOLD
- Expected Outcome:
- Side pot created
- Pot 0: 60M (30M × 2)
- Pot 1: 40M (20M × 2)
- Total pot before rake: 100M
Description: All check, goes to showdown
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: All check
- RIVER: Seat 1 CHECK, Seat 2 CHECK, Seat 3 CHECK, Seat 0 CHECK
- Expected Outcome:
- Hand ends via showdown
- Winner determined by best hand
- Pot before rake: 8M
- Rake (0 bps): 0
- Rake (700 bps): 560,000
Description: Bet, all call, showdown
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: All check
- RIVER: Seat 1 BET (5M), Seat 2 CALL (5M), Seat 3 CALL (5M), Seat 0 CALL (5M)
- Expected Outcome:
- Hand ends via showdown
- Pot before rake: 28M (8M + 5M + 5M + 5M + 5M)
- Rake (0 bps): 0
- Rake (700 bps): 1,960,000
Description: Bet, two fold, one calls
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: All check
- RIVER: Seat 1 BET (5M), Seat 2 FOLD, Seat 3 FOLD, Seat 0 CALL (5M)
- Expected Outcome:
- Hand ends via showdown with 2 players
- Pot before rake: 18M (8M + 5M + 5M)
- Rake (0 bps): 0
- Rake (700 bps): 1,260,000
Description: Bet, raise, others call, showdown
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: All check
- RIVER: Seat 1 BET (5M), Seat 2 RAISE (to 15M total, 10M incremental), Seat 3 CALL (15M), Seat 0 CALL (15M), Seat 1 CALL (10M)
- Expected Outcome:
- Hand ends via showdown
- Pot before rake: 58M (8M + 5M + 10M + 15M + 15M + 10M)
- Rake (0 bps): 0
- Rake (700 bps): 4,060,000
Description: Two players tie with same hand rank
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: All check
- RIVER: All check
- Expected Outcome:
- Hand ends via showdown
- Two players have identical hand rank (e.g., both have pair of 10s with same kickers)
- Winner: Both players (tie)
- Pot split equally between two winners
- Pot before rake: 8M
- Pot after rake (0 bps): 8M (4M each)
- Pot after rake (700 bps): 7,440,000 (3,720,000 each)
Description: Three players tie with same hand rank
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: All check
- RIVER: All check
- Expected Outcome:
- Hand ends via showdown
- Three players have identical hand rank
- Winner: Three players (tie)
- Pot split equally among three winners
- Pot before rake: 8M
- Pot after rake (0 bps): 8M (2.67M each, rounded)
- Pot after rake (700 bps): 7,440,000 (2,480,000 each)
Description: All four players tie with same hand rank
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: All check
- RIVER: All check
- Expected Outcome:
- Hand ends via showdown
- All four players have identical hand rank
- Winner: All four players (tie)
- Pot split equally among four winners
- Pot before rake: 8M
- Pot after rake (0 bps): 8M (2M each)
- Pot after rake (700 bps): 7,440,000 (1,860,000 each)
Description: Two players tie on main pot, side pot won by one player
- Actions:
- PRE_FLOP: Seat 3 ALL_IN (20M), Seat 0 ALL_IN (30M), Seat 1 ALL_IN (50M), Seat 2 FOLD
- Expected Outcome:
- Main pot: Two players tie, split equally
- Side pot 1: Only one player eligible, wins entire pot
- Side pot 2: Only one player eligible, wins entire pot
- Pot 0 before rake: 60M (20M × 3, but only 2 eligible) - split 30M each
- Pot 1 before rake: 30M (10M × 3, but only 2 eligible) - split 15M each
- Pot 2 before rake: 20M (10M × 2) - one player wins all
Description: Three players tie on main pot, side pot won by one
- Actions:
- PRE_FLOP: Seat 3 ALL_IN (20M), Seat 0 ALL_IN (30M), Seat 1 ALL_IN (40M), Seat 2 FOLD
- Expected Outcome:
- Main pot: Three players tie, split equally
- Side pot 1: Two players eligible, one wins or ties
- Side pot 2: One player eligible, wins all
- Pot 0 before rake: 60M (20M × 3) - split 20M each
- Pot 1 before rake: 30M (10M × 3, but only 2 eligible) - split 15M each
- Pot 2 before rake: 20M (10M × 2) - one player wins all
Description: Players tie on pair, kicker determines winner
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: All check
- RIVER: All check
- Expected Outcome:
- Hand ends via showdown
- Multiple players have same pair
- Winner determined by highest kicker
- If kickers also tie, pot split among tied players
- Pot before rake: 8M
Description: Multiple players have same pair, kicker determines winner
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: All check
- RIVER: All check
- Expected Outcome:
- Player with highest kicker wins
- Pot before rake: 8M
Description: Multiple players have two pair, kicker determines winner
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: All check
- RIVER: All check
- Expected Outcome:
- Player with highest second pair wins
- If second pairs tie, highest kicker wins
- Pot before rake: 8M
Description: Multiple players have three of a kind, kicker determines winner
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: All check
- RIVER: All check
- Expected Outcome:
- Player with highest kicker wins
- Pot before rake: 8M
Description: Multiple players have full house, trips determine winner
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: All check
- RIVER: All check
- Expected Outcome:
- Player with highest trips wins
- If trips tie, highest pair wins
- Pot before rake: 8M
Description: Three players all-in for different amounts creating two side pots
- Actions:
- PRE_FLOP: Seat 3 ALL_IN (20M), Seat 0 ALL_IN (30M), Seat 1 ALL_IN (50M), Seat 2 FOLD
- Expected Outcome:
- Pot 0: 60M (20M × 3, all eligible)
- Pot 1: 30M (10M × 3, but only 2 eligible)
- Pot 2: 40M (20M × 2, only 1 eligible)
- Total pot before rake: 130M
Description: All four players all-in for different amounts creating three side pots
- Actions:
- PRE_FLOP: Seat 1 ALL_IN (20M), Seat 2 ALL_IN (30M), Seat 3 ALL_IN (40M), Seat 0 ALL_IN (50M)
- Expected Outcome:
- Pot 0: 80M (20M × 4, all eligible)
- Pot 1: 40M (10M × 4, but only 3 eligible)
- Pot 2: 30M (10M × 3, but only 2 eligible)
- Pot 3: 20M (10M × 2, only 1 eligible)
- Total pot before rake: 170M
Description: Players all-in after previous betting rounds
- Actions:
- PRE_FLOP: All call
- FLOP: Seat 1 ALL_IN (20M), Seat 2 ALL_IN (30M), Seat 3 ALL_IN (50M), Seat 0 FOLD
- Expected Outcome:
- Previous pot: 8M (from PRE_FLOP)
- Pot 0: 60M (20M × 3, all eligible)
- Pot 1: 30M (10M × 3, but only 2 eligible)
- Pot 2: 40M (20M × 2, only 1 eligible)
- Total pot before rake: 138M
Description: Player all-in for less than current bet
- Actions:
- PRE_FLOP: All call
- FLOP: Seat 1 BET (10M), Seat 2 ALL_IN (5M - less than bet), Seat 3 CALL (10M), Seat 0 CALL (10M), Seat 1 Action
- Expected Outcome:
- Side pot created for difference
- Pot 0: 20M (5M × 4, all eligible)
- Pot 1: 20M (5M × 3, only 3 eligible)
- Total pot before rake: 40M
Description: Player all-in, another player raises
- Actions:
- PRE_FLOP: All call
- FLOP: Seat 1 ALL_IN (20M), Seat 2 RAISE (to 30M total), Seat 3 CALL (30M), Seat 0 CALL (30M)
- Expected Outcome:
- Side pot created
- Pot 0: 80M (20M × 4, all eligible)
- Pot 1: 30M (10M × 3, only 3 eligible)
- Total pot before rake: 110M
Description: First hand with initial dealer/blind positions
- Setup:
- Dealer: Seat 0
- Small Blind: Seat 1
- Big Blind: Seat 2
- UTG: Seat 3
- Expected Outcome:
- Positions set correctly
- Action starts with Seat 3 (UTG)
Description: Second hand, positions rotate
- Setup:
- Previous hand: D=0, SB=1, BB=2, UTG=3
- Dealer: Seat 1
- Small Blind: Seat 2
- Big Blind: Seat 3
- UTG: Seat 0
- Expected Outcome:
- Positions rotated correctly
- Action starts with Seat 0 (UTG)
Description: Third hand, positions rotate again
- Setup:
- Previous hand: D=1, SB=2, BB=3, UTG=0
- Dealer: Seat 2
- Small Blind: Seat 3
- Big Blind: Seat 0
- UTG: Seat 1
- Expected Outcome:
- Positions rotated correctly
- Action starts with Seat 1 (UTG)
Description: Fourth hand, positions rotate again
- Setup:
- Previous hand: D=2, SB=3, BB=0, UTG=1
- Dealer: Seat 3
- Small Blind: Seat 0
- Big Blind: Seat 1
- UTG: Seat 2
- Expected Outcome:
- Positions rotated correctly
- Action starts with Seat 2 (UTG)
Description: Fifth hand, cycle completes and repeats
- Setup:
- Previous hand: D=3, SB=0, BB=1, UTG=2
- Dealer: Seat 0
- Small Blind: Seat 1
- Big Blind: Seat 2
- UTG: Seat 3
- Expected Outcome:
- Positions back to initial state
- Cycle repeats correctly
Description: Player eliminated, rotation continues correctly
- Setup:
- Hand 1: D=0, SB=1, BB=2, UTG=3
- Seat 3 eliminated (busted out)
- Hand 2: D=1, SB=2, BB=0, UTG=1 (wraps around)
- Expected Outcome:
- Rotation skips eliminated player
- Positions set correctly for remaining players
Description: Multiple players eliminated, rotation continues
- Setup:
- Hand 1: D=0, SB=1, BB=2, UTG=3
- Seats 2 and 3 eliminated
- Hand 2: D=1, SB=0, UTG=1 (2-player game)
- Expected Outcome:
- Rotation adjusts for remaining players
- Positions set correctly
Description: Betting occurs on every round, goes to river showdown
- Actions:
- PRE_FLOP: All call, UTG raises to 5M, all call
- FLOP: Seat 1 bets 5M, all call
- TURN: Seat 2 bets 10M, all call
- RIVER: Seat 3 bets 15M, all call
- Expected Outcome:
- Hand ends via showdown
- Pot before rake: ~68M (varies by exact actions)
- Rake (0 bps): 0
- Rake (700 bps): ~4,760,000
Description: Raises occur on every round
- Actions:
- PRE_FLOP: UTG raises, BB re-raises, all call
- FLOP: Bet, raise, all call
- TURN: Bet, raise, all call
- RIVER: Bet, raise, all call
- Expected Outcome:
- Hand ends via showdown
- Large pot created
- Rake calculated on total pot
Description: All players check every round
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: All check
- RIVER: All check
- Expected Outcome:
- Hand ends via showdown
- Pot before rake: 8M (only blinds)
- Rake (0 bps): 0
- Rake (700 bps): 560,000
Description: Players eliminated in different rounds
- Actions:
- PRE_FLOP: One player folds
- FLOP: Another player folds
- TURN: Another player folds
- RIVER: Showdown with one player
- Expected Outcome:
- Hand ends with single winner
- Pot accumulates from all rounds
Description: All players all-in pre-flop
- Actions:
- PRE_FLOP: All players all-in
- Expected Outcome:
- Auto-advance to RIVER
- Hand ends via showdown
- Side pots created if different amounts
Description: Players all-in on different rounds
- Actions:
- PRE_FLOP: One player all-in
- FLOP: Another player all-in
- TURN: Another player all-in
- RIVER: Showdown
- Expected Outcome:
- Multiple side pots created
- Complex pot distribution
Description: Minimum raise on every round
- Actions:
- PRE_FLOP: Minimum raise, all call
- FLOP: Minimum raise, all call
- TURN: Minimum raise, all call
- RIVER: Minimum raise, all call
- Expected Outcome:
- Hand ends via showdown
- Pot before rake: ~20M
- Rake (0 bps): 0
- Rake (700 bps): ~1,400,000
Description: Large raises on every round
- Actions:
- PRE_FLOP: Large raise, all call
- FLOP: Large bet, all call
- TURN: Large bet, all call
- RIVER: Large bet, all call
- Expected Outcome:
- Hand ends via showdown
- Very large pot created
- Rake calculated correctly
Description: Player goes all-in when remaining balance is less than required bet
- Actions:
- PRE_FLOP: All call
- FLOP: Bet 10M, player all-in for 5M
- Expected Outcome:
- Side pot created
- Pot calculation accounts for different amounts
Description: Four different all-in amounts creating three side pots
- Actions:
- PRE_FLOP: All four players all-in for different amounts
- Expected Outcome:
- Three side pots created
- Each pot distributed correctly
- Rake calculated per pot
Description: Player all-in, others fold
- Actions:
- PRE_FLOP: Player all-in, all others fold
- Expected Outcome:
- Hand ends immediately
- Single winner
- Pot before rake: amount committed
Description: Player all-in, others call
- Actions:
- PRE_FLOP: Player all-in, others call
- Expected Outcome:
- Auto-advance to RIVER if all all-in
- Showdown occurs
Description: Multiple side pots with ties on some pots
- Actions:
- PRE_FLOP: Multiple players all-in for different amounts
- Expected Outcome:
- Main pot: Some players tie, split
- Side pot 1: Single winner
- Side pot 2: Single winner
- Each pot distributed correctly
Description: Edge cases with kicker determination
- Actions:
- PRE_FLOP: All call
- FLOP: All check
- TURN: All check
- RIVER: All check
- Expected Outcome:
- Winner determined by kicker
- Ties handled correctly
- Pot distributed correctly
- PRE-FLOP: 14 scenarios
- FLOP: 10 scenarios
- TURN: 4 scenarios
- RIVER: 4 scenarios
- MULTI-WAY TIE: 6 scenarios
- KICKER: 4 scenarios
- COMPLEX SIDE POT: 5 scenarios
- DEALER/BLIND ROTATION: 7 scenarios
- MULTI-ROUND: 6 scenarios
- EDGE CASES: 8 scenarios
- 0 bps: All scenarios tested
- 700 bps: All scenarios tested
- Single Winner (Fold): ~30 scenarios
- Showdown (Single Winner): ~40 scenarios
- Showdown (Tie): ~20 scenarios
- Multi-Way Showdown: ~10 scenarios
- Blind Structure: All scenarios assume small blind = 1M, big blind = 2M
- Chip Amounts: All amounts in gwei (1 gwei = 1e-9 ETH)
- Rake Calculation: Rake = (pot_amount * rake_bps) / 10000
- Side Pots: Created when players commit different amounts
- Auto-Advancement: When all active players are all-in, rounds auto-advance to RIVER
- Showdown: Occurs when hand reaches RIVER or all active players are all-in
- Tie Handling: Pots split equally among tied winners
- Pot Distribution: Each pot distributed separately based on eligible players
- Kicker Rules: Highest kicker wins when main hand ranks tie
- Rotation: Dealer/blind positions rotate after each hand
When implementing these tests:
- Use deterministic deck shuffling for reproducible results
- Set up proper initial balances for each scenario
- Verify rake is added to TEE escrow balance
- Verify pot amounts match expected values
- Verify winner determination matches expected outcome
- Test both 0 bps and 700 bps rake scenarios
- Verify side pot creation and distribution when applicable
- Verify hand evaluation and comparison logic for showdowns
- Verify auto-advancement to RIVER when all active players are all-in
- Verify event creation with correct settlement data
- Verify dealer/blind rotation across multiple hands
- Verify kicker determination logic
- Verify multi-way tie handling
- Verify complex side pot scenarios with multiple pots
- Test action order correctness (UTG, then clockwise)
- Verify partial all-in scenarios (all-in for less than bet)
- Test elimination scenarios (players busting out)
- Verify pot distribution with ties on some pots but not others
- Seat 0: A♠ K♠ (best hand)
- Seat 1: Q♠ J♠
- Seat 2: 10♠ 9♠
- Seat 3: 8♠ 7♠
- Community: 6♠ 5♥ 4♦ 3♣ 2♥
- Seat 0: 10♠ 5♠
- Seat 1: 10♥ 5♥
- Seat 2: 9♠ 4♠
- Seat 3: 8♠ 3♠
- Community: 10♦ A♣ K♥ Q♦ J♠ (pair of 10s, both have A-K-Q-J kickers)
- Seat 0: 10♠ 5♠
- Seat 1: 10♥ 5♥
- Seat 2: 10♦ 5♦
- Seat 3: 9♠ 4♠
- Community: 10♣ A♣ K♥ Q♦ J♠ (pair of 10s, three have A-K-Q-J kickers)
- Seat 0: 10♠ 5♠
- Seat 1: 10♥ 5♥
- Seat 2: 10♦ 5♦
- Seat 3: 10♣ 5♣
- Community: 10♠ A♣ K♥ Q♦ J♠ (pair of 10s, all have A-K-Q-J kickers)
- Seat 0: A♠ 10♠ (pair of 10s, A kicker)
- Seat 1: K♠ 10♥ (pair of 10s, K kicker)
- Seat 2: Q♠ 10♦ (pair of 10s, Q kicker)
- Seat 3: J♠ 9♠
- Community: 10♠ 5♥ 4♦ 3♣ 2♥
- Hand 1: D=0, SB=1, BB=2, UTG=3
- Hand 2: D=1, SB=2, BB=3, UTG=0
- Hand 3: D=2, SB=3, BB=0, UTG=1
- Hand 4: D=3, SB=0, BB=1, UTG=2
- Hand 5: D=0, SB=1, BB=2, UTG=3 (cycle repeats)
Each hand should:
- Verify dealer position
- Verify small blind position
- Verify big blind position
- Verify UTG position (first to act pre-flop)
- Verify action order is correct
- Complete hand and verify next hand rotates correctly
- Multiple Side Pots: Test 3-4 different all-in amounts
- Multi-Way Ties: Test 2, 3, and 4-way ties
- Kicker Requirements: Test various kicker scenarios
- Rotation: Test full rotation cycle
- Partial All-In: Test all-in for less than bet
- Progressive Elimination: Test players eliminated in different rounds
- Complex Showdowns: Test multiple winners across different pots