Skip to content

Commit 1eb7810

Browse files
committed
fix #1305
1 parent 169fab6 commit 1eb7810

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/conventions/h-group/interpret-discard.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ export function interpret_discard(game, action) {
271271
}
272272
// Check if a Trash Order Chop Move happened.
273273
if (game.level >= LEVEL.TRASH_PUSH && !state.inEndgame()) {
274-
const leftmost_kt = before_trash.sort((a, b) => b - a)[0];
275-
if (order !== leftmost_kt) {
274+
const kt = before_trash.sort((a, b) => b - a);
275+
if (kt.length > 0 && order !== kt[0]) {
276276
// check for the Shout Trash Order cm
277277
const shout = (common.thinksPlayables(state, playerIndex).length) > 0 ? 1 : 0;
278278
const players_after = before_trash.indexOf(order) + shout;

0 commit comments

Comments
 (0)