@@ -123,7 +123,7 @@ function resolve_clue(game, old_game, action, inf_possibilities, focused_card) {
123
123
common . waiting_connections . push ( {
124
124
connections,
125
125
conn_index : 0 ,
126
- focused_card ,
126
+ focus ,
127
127
inference,
128
128
giver,
129
129
target,
@@ -143,7 +143,7 @@ function resolve_clue(game, old_game, action, inf_possibilities, focused_card) {
143
143
) ) ;
144
144
const ownBlindPlays = correct_match ?. connections . filter ( conn => conn . type === 'finesse' && conn . reacting === state . ourPlayerIndex ) . length || 0 ;
145
145
const symmetric_fps = find_symmetric_connections ( game , old_game , action , inf_possibilities , selfRanks , ownBlindPlays ) ;
146
- const symmetric_connections = generate_symmetric_connections ( state , symmetric_fps , inf_possibilities , focused_card , giver , target ) ;
146
+ const symmetric_connections = generate_symmetric_connections ( state , symmetric_fps , inf_possibilities , focus , giver , target ) ;
147
147
148
148
if ( correct_match ?. connections [ 0 ] ?. bluff ) {
149
149
const { reacting } = correct_match . connections [ 0 ] ;
@@ -363,7 +363,7 @@ export function interpret_clue(game, action) {
363
363
const to_remove = new Set ( ) ;
364
364
365
365
for ( const [ i , waiting_connection ] of Object . entries ( common . waiting_connections ) ) {
366
- const { connections, conn_index, action_index, focused_card : wc_focus , inference, target : wc_target } = waiting_connection ;
366
+ const { connections, conn_index, action_index, focus : wc_focus , inference, target : wc_target } = waiting_connection ;
367
367
const focus_id = state . deck [ focus ] . identity ( ) ;
368
368
369
369
if ( focus_id !== undefined && list . length === 1 ) {
@@ -387,17 +387,17 @@ export function interpret_clue(game, action) {
387
387
if ( impossible_conn !== undefined )
388
388
logger . warn ( `connection [${ connections . map ( logConnection ) } ] depends on revealed card having identities ${ impossible_conn . identities . map ( logCard ) } ` ) ;
389
389
390
- else if ( ! common . thoughts [ wc_focus . order ] . possible . has ( inference ) )
390
+ else if ( ! common . thoughts [ wc_focus ] . possible . has ( inference ) )
391
391
logger . warn ( `connection [${ connections . map ( logConnection ) } ] depends on focused card having identity ${ logCard ( inference ) } ` ) ;
392
392
393
393
else
394
394
continue ;
395
395
396
- const rewind_card = state . deck [ impossible_conn ?. order ] ?? wc_focus ;
397
- const rewind_identity = common . thoughts [ rewind_card . order ] ?. identity ( ) ;
396
+ const rewind_order = impossible_conn ?. order ?? wc_focus ;
397
+ const rewind_identity = common . thoughts [ rewind_order ] ?. identity ( ) ;
398
398
399
- if ( rewind_identity !== undefined && ! common . thoughts [ rewind_card . order ] . rewinded && wc_target === state . ourPlayerIndex && state . ourHand . includes ( rewind_card . order ) ) {
400
- const new_game = game . rewind ( rewind_card . drawn_index , [ { type : 'identify' , order : rewind_card . order , playerIndex : state . ourPlayerIndex , identities : [ rewind_identity . raw ( ) ] } ] ) ;
399
+ if ( rewind_identity !== undefined && ! common . thoughts [ rewind_order ] . rewinded && wc_target === state . ourPlayerIndex && state . ourHand . includes ( rewind_order ) ) {
400
+ const new_game = game . rewind ( state . deck [ rewind_order ] . drawn_index , [ { type : 'identify' , order : rewind_order , playerIndex : state . ourPlayerIndex , identities : [ rewind_identity . raw ( ) ] } ] ) ;
401
401
if ( new_game ) {
402
402
Object . assign ( game , new_game ) ;
403
403
return ;
@@ -680,7 +680,7 @@ export function interpret_clue(game, action) {
680
680
}
681
681
682
682
try {
683
- logger . debug ( 'hand state after clue' , logHand ( state . hands [ target ] . map ( o => state . deck [ o ] ) ) ) ;
683
+ logger . debug ( 'hand state after clue' , logHand ( state . hands [ target ] ) ) ;
684
684
}
685
685
catch ( err ) {
686
686
logger . info ( 'Failed to debug hand state' , err , state . hands [ target ] , Utils . globals . game . common . thoughts . map ( c => c . order ) ) ;
0 commit comments