File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -614,6 +614,8 @@ export async function take_action(game) {
614
614
if ( trash_orders . length >= 2 && game . level >= LEVEL . TRASH_PUSH ) {
615
615
for ( let i = 1 ; i < trash_orders . length ; i ++ ) {
616
616
const next_chop = me . chop ( state . hands [ player_check_index ] ) ;
617
+ if ( next_chop === undefined )
618
+ continue ;
617
619
const chop_value = cardValue ( state , me , state . deck [ next_chop ] , next_chop ) ;
618
620
const new_chop_value = me . withThoughts ( next_chop , ( draft ) => { draft . chop_moved = true ; } ) . chopValue ( state , nextPlayerIndex ) ;
619
621
if ( new_chop_value < chop_value && chop_value >= 1 )
@@ -717,6 +719,8 @@ export async function take_action(game) {
717
719
if ( trash_orders . length >= 2 && game . level >= LEVEL . TRASH_PUSH ) {
718
720
for ( let i = 1 ; i < trash_orders . length ; i ++ ) {
719
721
const next_chop = me . chop ( state . hands [ player_check_index ] ) ;
722
+ if ( next_chop === undefined )
723
+ continue ;
720
724
const chop_value = cardValue ( state , me , state . deck [ next_chop ] , next_chop ) ;
721
725
const new_chop_value = me . withThoughts ( next_chop , ( draft ) => { draft . chop_moved = true ; } ) . chopValue ( state , nextPlayerIndex ) ;
722
726
if ( new_chop_value < chop_value && chop_value >= 1 )
You can’t perform that action at this time.
0 commit comments