X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FAlapo.js;h=3037954e87f9baba6d8ba28dffe62fe713e22f46;hb=e85bddc13ff00ef1fc13f33795ad7a2293c2f08d;hp=f525555ace9da1b1d4d0495eaa3c978fdbe339c6;hpb=ded43c88fad60fd8f9bb46aabd67f3f2092f65f3;p=vchess.git diff --git a/client/src/variants/Alapo.js b/client/src/variants/Alapo.js index f525555a..3037954e 100644 --- a/client/src/variants/Alapo.js +++ b/client/src/variants/Alapo.js @@ -1,4 +1,6 @@ import { ChessRules } from "@/base_rules"; +import { ArrayFun } from "@/utils/array"; +import { randInt } from "@/utils/alea"; export class AlapoRules extends ChessRules { @@ -113,11 +115,12 @@ export class AlapoRules extends ChessRules { pieces[c][bishop2Pos] = "b"; pieces[c][rook2Pos] = "r"; } + return ( pieces["b"].join("") + "/" + - pieces["b"].map(p => piece2pawn[p]).join() + - "/8/8/8/8/" + - pieces["w"].map(p => piece2pawn[p].toUpperCase()).join() + "/" + + pieces["b"].map(p => piece2pawn[p]).join("") + + "/6/6/" + + pieces["w"].map(p => piece2pawn[p].toUpperCase()).join("") + "/" + pieces["w"].join("").toUpperCase() + " w 0" );