X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FBaroque.js;h=9b5a3cdb1502336226f95cf4a7992de6fbcf9ad2;hp=ce9e66727be0e995656770bc40b7e78ed1283d83;hb=0c3fe8a6c3e02af46e0bc646b40c1a0c420f9dcd;hpb=41c80bb63b85b2696d3925c10784c3d7bb5d2aa3 diff --git a/client/src/variants/Baroque.js b/client/src/variants/Baroque.js index ce9e6672..9b5a3cdb 100644 --- a/client/src/variants/Baroque.js +++ b/client/src/variants/Baroque.js @@ -1,4 +1,8 @@ -class BaroqueRules extends ChessRules +import { ChessRules, PiPo, Move } from "@/base_rules"; +import { ArrayFun } from "@/utils/array"; +import { randInt } from "@/utils/alea"; + +export const VariantRules = class BaroqueRules extends ChessRules { static get HasFlags() { return false; } @@ -548,7 +552,7 @@ class BaroqueRules extends ChessRules // Shuffle pieces on first and last rank for (let c of ["w","b"]) { - let positions = range(8); + let positions = ArrayFun.range(8); // Get random squares for every piece, totally freely let randIndex = randInt(8); @@ -592,7 +596,7 @@ class BaroqueRules extends ChessRules return pieces["b"].join("") + "/pppppppp/8/8/8/8/PPPPPPPP/" + pieces["w"].join("").toUpperCase() + - " w"; + " w 0"; } getNotation(move)