From: Benjamin Auder Date: Wed, 15 Apr 2020 02:44:13 +0000 (+0200) Subject: Fixes X-Git-Url: https://git.auder.net/js/current/doc/common.css?a=commitdiff_plain;h=118cff5c4d458f1f76a6f1f6813f4d4feaf4594c;p=vchess.git Fixes --- diff --git a/client/src/variants/Makruk.js b/client/src/variants/Makruk.js index 2da534f1..9f9c37b6 100644 --- a/client/src/variants/Makruk.js +++ b/client/src/variants/Makruk.js @@ -104,7 +104,7 @@ export class MakrukRules extends ChessRules { } isAttackedByBishop(sq, color) { - const forward = (this.turn == 'w' ? 1 : -1); + const forward = (color == 'w' ? 1 : -1); return this.isAttackedBySlideNJump( sq, color, diff --git a/client/src/variants/Shogi.js b/client/src/variants/Shogi.js index 7e827bc2..da9a7c4c 100644 --- a/client/src/variants/Shogi.js +++ b/client/src/variants/Shogi.js @@ -268,7 +268,7 @@ export class ShogiRules extends ChessRules { // Modified to take promotions into account getSlideNJumpMoves([x, y], steps, options) { - const options = options || {}; + options = options || {}; const color = this.turn; const oneStep = options.oneStep; const forcePromoteOnLastRank = options.force;