X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FGrasshopper.js;h=fcc6bb101ee29efc961a841ed0ce3cb577452e77;hb=4313762da3237b04f204e121a20cab3ba7bb5dd2;hp=5069e2317a10cd4f119491ac78d2a06e664419e3;hpb=cd49e617866590dbc68530ad961b109cdbe1ce55;p=vchess.git diff --git a/client/src/variants/Grasshopper.js b/client/src/variants/Grasshopper.js index 5069e231..fcc6bb10 100644 --- a/client/src/variants/Grasshopper.js +++ b/client/src/variants/Grasshopper.js @@ -3,6 +3,7 @@ import { ArrayFun } from "@/utils/array"; import { randInt } from "@/utils/alea"; export class GrasshopperRules extends ChessRules { + static get HasEnpassant() { return false; } @@ -11,10 +12,7 @@ export class GrasshopperRules extends ChessRules { return Object.assign( {}, ChessRules.PawnSpecs, - { - twoSquares: false, - promotions: ChessRules.PawnSpecs.promotions.concat([V.GRASSHOPPER]) - } + { promotions: ChessRules.PawnSpecs.promotions.concat([V.GRASSHOPPER]) } ); } @@ -103,12 +101,13 @@ export class GrasshopperRules extends ChessRules { return 2; } - static GenRandInitFen(randomness) { - return ChessRules.GenRandInitFen(randomness) + static GenRandInitFen(options) { + return ChessRules.GenRandInitFen(options) .slice(0, -2) .replace( "/pppppppp/8/8/8/8/PPPPPPPP/", "/gggggggg/pppppppp/8/8/PPPPPPPP/GGGGGGGG/" ); } + };