From ed3ea30f807b8dcc1aa220bd97b1c9f6f4985146 Mon Sep 17 00:00:00 2001 From: yukirij Date: Thu, 5 Sep 2024 10:02:37 -0700 Subject: [PATCH] Fix stride blocking check. --- www/js/game.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/js/game.js b/www/js/game.js index 8d53d20..6127027 100644 --- a/www/js/game.js +++ b/www/js/game.js @@ -517,7 +517,7 @@ GAME.Game = class { if(dist == 1) { check = GAME.Const.Check.Direct; } else { check = GAME.Const.Check.Stride; } - if(stride) { block = dir_mask; } + if(stride > 0) { block = dir_mask; } // Apply check to previous moves. for(let idist = 1; idist < dist; idist++) { @@ -525,7 +525,7 @@ GAME.Game = class { } } - if(pieces_blocking == 1 && stride) { + if(pieces_blocking == 1 && stride > 0) { // Apply blocking to last . for(let idist = 1; idist < dist; idist++) { if(this.board.tiles[tiles[tiles.length - idist].tile].piece !== null) {