From: Benjamin Auder Date: Tue, 10 Mar 2020 00:29:27 +0000 (+0100) Subject: Fix typo X-Git-Url: https://git.auder.net/js/current/doc/pieces/cq.svg?a=commitdiff_plain;h=bbf668379ae5980d5068dd76cf907c87ce7ed648;p=vchess.git Fix typo --- diff --git a/client/src/variants/Atomic.js b/client/src/variants/Atomic.js index 4aad7b72..fdc665d8 100644 --- a/client/src/variants/Atomic.js +++ b/client/src/variants/Atomic.js @@ -2,7 +2,7 @@ import { ChessRules, PiPo } from "@/base_rules"; export const VariantRules = class AtomicRules extends ChessRules { getEpSquare(moveOrSquare) { - if (typeof moveOrSquare !== "object" || move.appear.length > 0) + if (typeof moveOrSquare !== "object" || moveOrSquare.appear.length > 0) return super.getEpSquare(moveOrSquare); // Capturing move: no en-passant return undefined; diff --git a/client/src/variants/Checkered.js b/client/src/variants/Checkered.js index fa3a6b7e..78b5ef07 100644 --- a/client/src/variants/Checkered.js +++ b/client/src/variants/Checkered.js @@ -91,7 +91,7 @@ export const VariantRules = class CheckeredRules extends ChessRules { } getEpSquare(moveOrSquare) { - if (typeof moveOrSquare !== "object" || move.appear[0].c != 'c') + if (typeof moveOrSquare !== "object" || moveOrSquare.appear[0].c != 'c') return super.getEpSquare(moveOrSquare); // Checkered move: no en-passant return undefined; diff --git a/client/src/variants/Crazyhouse.js b/client/src/variants/Crazyhouse.js index ff705c73..0a237c7d 100644 --- a/client/src/variants/Crazyhouse.js +++ b/client/src/variants/Crazyhouse.js @@ -29,7 +29,7 @@ export const VariantRules = class CrazyhouseRules extends ChessRules { } getEpSquare(moveOrSquare) { - if (typeof moveOrSquare !== "object" || move.vanish.length > 0) + if (typeof moveOrSquare !== "object" || moveOrSquare.vanish.length > 0) return super.getEpSquare(moveOrSquare); // Landing move: no en-passant return undefined; diff --git a/client/src/variants/Recycle.js b/client/src/variants/Recycle.js index 73d91669..82895f35 100644 --- a/client/src/variants/Recycle.js +++ b/client/src/variants/Recycle.js @@ -19,7 +19,7 @@ export const VariantRules = class RecycleRules extends ChessRules { } getEpSquare(moveOrSquare) { - if (typeof moveOrSquare !== "object" || move.vanish.length > 0) + if (typeof moveOrSquare !== "object" || moveOrSquare.vanish.length > 0) return super.getEpSquare(moveOrSquare); // Landing move: no en-passant return undefined; diff --git a/client/src/variants/Rifle.js b/client/src/variants/Rifle.js index 631fb13a..1cdbbbe4 100644 --- a/client/src/variants/Rifle.js +++ b/client/src/variants/Rifle.js @@ -2,7 +2,7 @@ import { ChessRules, PiPo, Move } from "@/base_rules"; export const VariantRules = class RifleRules extends ChessRules { getEpSquare(moveOrSquare) { - if (typeof moveOrSquare !== "object" || move.appear.length > 0) + if (typeof moveOrSquare !== "object" || moveOrSquare.appear.length > 0) return super.getEpSquare(moveOrSquare); // Capturing move: no en-passant return undefined;