X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FProgressive1.js;h=43c7c4dbe4e9d7e66f155b0ba6c61fad1e06d28a;hb=7e8a7ea1cb66adb4a987badfb0a3c2f99a21bd0a;hp=4f69ee90242bf5c5924ab07d61143f98e9024381;hpb=eaab401ea14ebbde1e49ede7c639bc3b6556bf08;p=vchess.git diff --git a/client/src/variants/Progressive1.js b/client/src/variants/Progressive1.js index 4f69ee90..43c7c4db 100644 --- a/client/src/variants/Progressive1.js +++ b/client/src/variants/Progressive1.js @@ -2,6 +2,7 @@ import { ChessRules } from "@/base_rules"; import { randInt } from "@/utils/alea"; export class Progressive1Rules extends ChessRules { + static get HasEnpassant() { return false; } @@ -28,7 +29,7 @@ export class Progressive1Rules extends ChessRules { } play(move) { - move.flags = JSON.stringify(this.aggregateFlags()); + if (V.HasFlags) move.flags = JSON.stringify(this.aggregateFlags()); const color = this.turn; const oppCol = V.GetOppCol(color); move.turn = [color, this.subTurn]; @@ -108,4 +109,5 @@ export class Progressive1Rules extends ChessRules { for (let i=res.length - 1; i>= 0; i--) this.undo(res[i]); return res; } + };