File tree 1 file changed +7
-1
lines changed
src/conventions/h-group/clue-interpretation
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -812,7 +812,13 @@ export function interpret_clue(game, action) {
812
812
}
813
813
last_possible_player = state . ourPlayerIndex ;
814
814
}
815
- const { possible } = common . thoughts [ state . hands [ last_possible_player ] . sort ( ( a , b ) => b - a ) . filter ( c => ! state . deck [ c ] . clued ) [ 0 ] ] ;
815
+ const p = common . thoughts [ state . hands [ last_possible_player ] . sort ( ( a , b ) => b - a ) . filter ( c => ! state . deck [ c ] . clued ) [ 0 ] ] ;
816
+ if ( p === undefined ) {
817
+ game . interpretMove ( CLUE_INTERP . NONE ) ;
818
+ team_elim ( game ) ;
819
+ return game ;
820
+ }
821
+ const { possible } = p ;
816
822
const new_inferred = possible . intersect ( possible . filter ( i => state . isPlayable ( i ) ) ) ;
817
823
common . updateThoughts ( state . hands [ last_possible_player ] . sort ( ( a , b ) => b - a ) . filter ( c => ! state . deck [ c ] . clued ) [ 0 ] ,
818
824
( draft ) => {
You can’t perform that action at this time.
0 commit comments