@@ -1711,7 +1711,7 @@ impl TableNoCell {
17111711 pub fn act_forced_bet_big_blind ( & mut self ) -> Result < ( ) , PKError > {
17121712 let bb = self . determine_big_blind ( ) ;
17131713 let actual = self . seats . act_forced_bet ( bb, self . forced . big_blind ) ?;
1714- self . bet = self . forced . big_blind ;
1714+ self . bet = actual ;
17151715 self . log ( TableAction :: ForcedBetBigBlind ( bb, actual) ) ;
17161716 self . log ( TableAction :: ActionTo ( self . next_to_act ( ) ) ) ;
17171717 Ok ( ( ) )
@@ -3258,6 +3258,23 @@ mod tests {
32583258 ) ;
32593259 }
32603260
3261+ // Regression: when BB is short-stacked, other players should only need to call
3262+ // what the BB actually posted, not the configured blind amount.
3263+ #[ test]
3264+ fn table_no_cell_to_call_capped_at_short_stack_bb ( ) {
3265+ // button=0: seat 0 = UTG/button, seat 1 = SB, seat 2 = BB (short-stacked)
3266+ let seats = SeatsNoCell :: new ( vec ! [
3267+ SeatNoCell :: new( PlayerNoCell :: new_with_chips( "UTG" . to_string( ) , 5_000 ) ) ,
3268+ SeatNoCell :: new( PlayerNoCell :: new_with_chips( "SB" . to_string( ) , 5_000 ) ) ,
3269+ SeatNoCell :: new( PlayerNoCell :: new_with_chips( "BB" . to_string( ) , 60 ) ) , // short-stacked
3270+ ] ) ;
3271+ let mut table = TableNoCell :: nlh_from_seats ( seats, ForcedBets :: new ( 50 , 100 ) ) ;
3272+ table. act_forced_bets ( ) . unwrap ( ) ;
3273+ let utg = table. determine_utg ( ) ;
3274+ // UTG should call 60 (what BB actually posted), not 100 (the configured blind).
3275+ assert_eq ! ( 60 , table. to_call( utg) ) ;
3276+ }
3277+
32613278 #[ test]
32623279 fn table_no_cell_bet_is_zero_before_blinds ( ) {
32633280 let table = make_two_player_table ( ) ;
@@ -3287,7 +3304,8 @@ mod tests {
32873304
32883305 #[ test]
32893306 fn table_no_cell_forced_bets_short_bb_to_call_full_amount ( ) {
3290- // BB (seat 2) has only 30 chips — posts all-in; UTG (seat 0) must still call 100.
3307+ // BB (seat 2) has only 30 chips — posts all-in; UTG (seat 0) needs to call
3308+ // only what BB actually posted (30), not the configured blind (100).
32913309 let seats = SeatsNoCell :: new ( vec ! [
32923310 SeatNoCell :: new( PlayerNoCell :: new_with_chips( "UTG" . to_string( ) , 5_000 ) ) ,
32933311 SeatNoCell :: new( PlayerNoCell :: new_with_chips( "SB" . to_string( ) , 5_000 ) ) ,
@@ -3303,12 +3321,12 @@ mod tests {
33033321 let _ = bb;
33043322
33053323 let utg = table. determine_utg ( ) ;
3306- assert_eq ! ( 100 , table. to_call( utg) ) ;
3324+ assert_eq ! ( 30 , table. to_call( utg) ) ;
33073325 }
33083326
33093327 #[ test]
33103328 fn table_no_cell_act_call_after_short_blind ( ) {
3311- // BB (seat 2) short-stack; UTG (seat 0) calls — commits 100 .
3329+ // BB (seat 2) short-stack; UTG (seat 0) calls — commits only what BB posted (30) .
33123330 let seats = SeatsNoCell :: new ( vec ! [
33133331 SeatNoCell :: new( PlayerNoCell :: new_with_chips( "UTG" . to_string( ) , 5_000 ) ) ,
33143332 SeatNoCell :: new( PlayerNoCell :: new_with_chips( "SB" . to_string( ) , 5_000 ) ) ,
@@ -3322,7 +3340,7 @@ mod tests {
33223340 table. act_call ( utg) . unwrap ( ) ;
33233341
33243342 let utg_seat = table. seats . get_seat ( utg) . unwrap ( ) ;
3325- assert_eq ! ( 100 , utg_seat. player. bet) ;
3343+ assert_eq ! ( 30 , utg_seat. player. bet) ;
33263344 }
33273345
33283346 // ── Chip audit ────────────────────────────────────────────────────────────
0 commit comments