X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FGrand.js;h=4ea521e04c4336fcc2120e00b16a8b45a6846303;hb=afde76668963c4d0d96002fcae2ebabb9acf81e4;hp=c910dd8e72a7e6a521d0500ab4182285195f28a1;hpb=7ba4a5bc5b64e19a1e7f26aa232d5c50770d07ad;p=vchess.git diff --git a/client/src/variants/Grand.js b/client/src/variants/Grand.js index c910dd8e..4ea521e0 100644 --- a/client/src/variants/Grand.js +++ b/client/src/variants/Grand.js @@ -39,6 +39,16 @@ export const VariantRules = class GrandRules extends ChessRules { return super.getFen() + " " + this.getCapturedFen(); } + getFenForRepeat() { + return ( + this.getBaseFen() + "_" + + this.getTurnFen() + "_" + + this.getFlagsFen() + "_" + + this.getEnpassantFen() + "_" + + this.getCapturedFen() + ); + } + getCapturedFen() { let counts = [...Array(14).fill(0)]; let i = 0; @@ -317,7 +327,6 @@ export const VariantRules = class GrandRules extends ChessRules { } static GenRandInitFen(randomness) { - if (!randomness) randomness = 2; if (randomness == 0) { return "rnbqkmcbnr/pppppppppp/10/10/10/10/10/10/PPPPPPPPPP/RNBQKMCBNR " + "w 0 1111 - 00000000000000";