Fix blocking on non-stride.
This commit is contained in:
parent
f2468621b2
commit
804074c0c5
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user