From 118cff5c4d458f1f76a6f1f6813f4d4feaf4594c Mon Sep 17 00:00:00 2001 From: Benjamin Auder <benjamin.auder@somewhere> Date: Wed, 15 Apr 2020 04:44:13 +0200 Subject: [PATCH] Fixes --- client/src/variants/Makruk.js | 2 +- client/src/variants/Shogi.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- 2.44.0