Skip to content

Commit 920c311

Browse files
committed
fix bug making bot give illegal trash pushes
1 parent 5e4964b commit 920c311

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/conventions/h-group/clue-interpretation/interpret-clue.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { determine_focus, getRealConnects, rankLooksPlayable, unknown_1 } from '
77
import { find_focus_possible } from './focus-possible.js';
88
import { IllegalInterpretation, find_own_finesses } from './own-finesses.js';
99
import { assign_all_connections, inference_rank, find_symmetric_connections, generate_symmetric_connections, occams_razor, connection_score } from './connection-helper.js';
10-
import { variantRegexes } from '../../../variants.js';
10+
import { variantRegexes, shortForms } from '../../../variants.js';
1111
import { remove_finesse } from '../update-wcs.js';
1212
import { order_1s } from '../action-helper.js';
1313
import { find_impossible_conn } from '../update-turn.js';
@@ -687,7 +687,7 @@ export function interpret_clue(game, action) {
687687
team_elim(game);
688688
return game;
689689
}
690-
logger.info('trash push!');
690+
logger.info('trash pushing card', shortForms[state.deck[order_pushed].suitIndex]+state.deck[order_pushed].rank);
691691
// mark all cards as trash
692692
for (const order of list) {
693693
if (!state.deck[order].newly_clued)
@@ -757,7 +757,8 @@ export function interpret_clue(game, action) {
757757
}
758758
}
759759
}
760-
additional_possibilities.push(new BasicCard(state.deck[order_pushed].suitIndex, state.deck[order_pushed].rank));
760+
if (giver !== game.me.playerIndex)
761+
additional_possibilities.push(new BasicCard(state.deck[order_pushed].suitIndex, state.deck[order_pushed].rank))
761762
const new_inferred = possible.intersect(possible.filter(i => state.isPlayable(i) ||
762763
additional_possibilities.some(x => {
763764
return x.suitIndex === i.suitIndex && x.rank === i.rank;

0 commit comments

Comments
 (0)