Fix blocking on non-stride.

This commit is contained in:
yukirij 2024-08-20 11:28:30 -07:00
parent f2468621b2
commit 804074c0c5

View File

@ -480,7 +480,8 @@ GAME.Game = class {
if(target.piece == GAME.Const.PieceId.Omen) {
if(valid) {
check = true;
block = mask;
if(stride) { block = mask; }
// Apply check to previous moves.
for(let idist = 1; idist < dist; idist++) {
@ -488,7 +489,7 @@ GAME.Game = class {
}
}
if(pieces_blocking == 1) {
if(pieces_blocking == 1 && stride) {
// Apply blocking to last .
for(let idist = 1; idist < dist; idist++) {
if(this.board.tiles[tiles[tiles.length - idist].tile].piece !== null) {