X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FSynochess.js;h=f8e9386b65b3ccfde607590f92ca9a9de6e5724d;hb=ded43c88fad60fd8f9bb46aabd67f3f2092f65f3;hp=e5c3213bfeceea530e0b81ee1cb20216aef03be7;hpb=1e8a838649e16509c80c9933d99d78856e11b5c2;p=vchess.git diff --git a/client/src/variants/Synochess.js b/client/src/variants/Synochess.js index e5c3213b..f8e9386b 100644 --- a/client/src/variants/Synochess.js +++ b/client/src/variants/Synochess.js @@ -344,7 +344,6 @@ export class SynochessRules extends ChessRules { let i = x + step[0]; let j = y + step[1]; while (V.OnBoard(i, j) && this.board[i][j] == V.EMPTY) { - moves.push(this.getBasicMove([x, y], [i, j])); i += step[0]; j += step[1]; } @@ -353,6 +352,7 @@ export class SynochessRules extends ChessRules { i += step[0]; j += step[1]; while (V.OnBoard(i, j) && this.board[i][j] == V.EMPTY) { + moves.push(this.getBasicMove([x, y], [i, j])); i += step[0]; j += step[1]; } @@ -527,7 +527,7 @@ export class SynochessRules extends ChessRules { evalPosition() { let evaluation = super.evalPosition(); - if (this.turn == 'b') + if (this.turn == 'b' && !!this.reserve) // Add reserves: evaluation += this.reserve['b'][V.SOLDIER] * V.VALUES[V.SOLDIER]; return evaluation;