@@ -167,9 +167,8 @@ export function find_all_discards(game, playerIndex) {
167
167
// this code is here to support TOCMs
168
168
const all_discards = [ { misplay : false , order : discardable } ] ;
169
169
for ( const c of trash_cards ) {
170
- if ( c != discardable ) {
170
+ if ( c != discardable )
171
171
all_discards . push ( { misplay : false , order : c } ) ;
172
- }
173
172
}
174
173
return positional !== undefined ? [ positional ] : ( discardable ? all_discards : [ ] ) ;
175
174
}
@@ -617,9 +616,8 @@ export async function take_action(game) {
617
616
const next_chop = me . chop ( state . hands [ player_check_index ] ) ;
618
617
const chop_value = cardValue ( state , me , state . deck [ next_chop ] , next_chop ) ;
619
618
const new_chop_value = me . withThoughts ( next_chop , ( draft ) => { draft . chop_moved = true ; } ) . chopValue ( state , nextPlayerIndex ) ;
620
- if ( new_chop_value < chop_value && chop_value >= 1 ) {
619
+ if ( new_chop_value < chop_value && chop_value >= 1 )
621
620
return { tableID, type : ACTION . DISCARD , target : trash_orders [ i ] } ;
622
- }
623
621
player_check_index = state . nextPlayerIndex ( player_check_index ) ;
624
622
}
625
623
}
@@ -721,9 +719,8 @@ export async function take_action(game) {
721
719
const next_chop = me . chop ( state . hands [ player_check_index ] ) ;
722
720
const chop_value = cardValue ( state , me , state . deck [ next_chop ] , next_chop ) ;
723
721
const new_chop_value = me . withThoughts ( next_chop , ( draft ) => { draft . chop_moved = true ; } ) . chopValue ( state , nextPlayerIndex ) ;
724
- if ( new_chop_value < chop_value && chop_value >= 1 ) {
722
+ if ( new_chop_value < chop_value && chop_value >= 1 )
725
723
return { tableID, type : ACTION . DISCARD , target : trash_orders [ i ] } ;
726
- }
727
724
player_check_index = state . nextPlayerIndex ( player_check_index ) ;
728
725
}
729
726
}
0 commit comments