From 829f65746b68955ad255e489c480fde613463e61 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Tue, 4 Feb 2020 19:13:04 +0100 Subject: [PATCH] Partial fix for marseilleChess (moveList is bad) --- TODO | 2 -- client/src/variants/Marseille.js | 7 +++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/TODO b/TODO index b51e7056..53eab354 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,2 @@ -Checkered chess: need another FEN element, last non-capturing checkered move (if applicable) - + need to stack these indicators for alpha beta search MarseilleChess: revise bot and test Translations (including About page), refresh rules diff --git a/client/src/variants/Marseille.js b/client/src/variants/Marseille.js index 0439ab4d..9b1d4eae 100644 --- a/client/src/variants/Marseille.js +++ b/client/src/variants/Marseille.js @@ -1,4 +1,6 @@ -class MarseilleRules extends ChessRules +import { ChessRules } from "@/base_rules"; + +export const VariantRules = class MarseilleRules extends ChessRules { static IsGoodEnpassant(enpassant) { @@ -144,12 +146,13 @@ class MarseilleRules extends ChessRules play(move) { move.flags = JSON.stringify(this.aggregateFlags()); - move.turn = this.turn + this.subturn; + move.turn = this.turn + this.subTurn; V.PlayOnBoard(this.board, move); const epSq = this.getEpSquare(move); if (this.subTurn == 0) //first move in game { this.turn = "b"; + this.subTurn = 1; this.epSquares.push([epSq]); } // Does this move give check on subturn 1? If yes, skip subturn 2 -- 2.44.0