Fix stride blocking check.
This commit is contained in:
parent
d328f93e4d
commit
ed3ea30f80
@ -517,7 +517,7 @@ GAME.Game = class {
|
|||||||
if(dist == 1) { check = GAME.Const.Check.Direct; }
|
if(dist == 1) { check = GAME.Const.Check.Direct; }
|
||||||
else { check = GAME.Const.Check.Stride; }
|
else { check = GAME.Const.Check.Stride; }
|
||||||
|
|
||||||
if(stride) { block = dir_mask; }
|
if(stride > 0) { block = dir_mask; }
|
||||||
|
|
||||||
// Apply check to previous moves.
|
// Apply check to previous moves.
|
||||||
for(let idist = 1; idist < dist; idist++) {
|
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 .
|
// Apply blocking to last .
|
||||||
for(let idist = 1; idist < dist; idist++) {
|
for(let idist = 1; idist < dist; idist++) {
|
||||||
if(this.board.tiles[tiles[tiles.length - idist].tile].piece !== null) {
|
if(this.board.tiles[tiles[tiles.length - idist].tile].piece !== null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user