X-Git-Url: https://git.auder.net/images/pieces/current/gitweb.js?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FGrand.js;h=4ea521e04c4336fcc2120e00b16a8b45a6846303;hb=42a9284896b9cf9a579d32b7cf77dfc1f5786472;hp=359671b6e9742899cfa53b1988a1bed3096ae0eb;hpb=f35b9960e1c527fc400ebac85321bd4712459da3;p=vchess.git diff --git a/client/src/variants/Grand.js b/client/src/variants/Grand.js index 359671b6..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;