X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FMarseille.js;h=9b1d4eaee226244f6458fd2af17721d46577597b;hp=0439ab4d2c61e3de3a01e7385b7f167641730f9f;hb=829f65746b68955ad255e489c480fde613463e61;hpb=03cff0f742307e1b9d6aa83a1fb84c7e8785dbe0 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