X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FAlapo.js;h=3037954e87f9baba6d8ba28dffe62fe713e22f46;hb=b2e8c34e0158f512741d67b8a1c25425e0b8747e;hp=6864457ebab8a471ee16f55032f2aa77712edfc5;hpb=0f7762c1d87e21d1c13ff0f38bd234b64b0a29d9;p=vchess.git diff --git a/client/src/variants/Alapo.js b/client/src/variants/Alapo.js index 6864457e..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" ); @@ -221,4 +224,15 @@ export class AlapoRules extends ChessRules { return super.getCurrentScore(); } + static get VALUES() { + return { + r: 5, + b: 3, + q: 9, + t: 3, + c: 2, + s: 5 + }; + } + };