X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FChakart.js;h=9659ef38fac18e2f9c30baa1666e097cf6d2d767;hb=21704b041240cb440d03cfa64a90ed0be6f28415;hp=86a867a9ef9ea728e5952cdfbe2bce27afdb8051;hpb=ccbb9dfc6459cb3cd80a21abf945693a3fe1b2d5;p=vchess.git diff --git a/client/src/variants/Chakart.js b/client/src/variants/Chakart.js index 86a867a9..9659ef38 100644 --- a/client/src/variants/Chakart.js +++ b/client/src/variants/Chakart.js @@ -5,6 +5,23 @@ import { randInt } from "@/utils/alea"; export class ChakartRules extends ChessRules { + static get Options() { + return { + select: [ + { + label: "Randomness", + variable: "randomness", + defaut: 2, + options: [ + { label: "Deterministic", value: 0 }, + { label: "Symmetric random", value: 1 }, + { label: "Asymmetric random", value: 2 } + ] + } + ] + }; + } + static get PawnSpecs() { return SuicideRules.PawnSpecs; } @@ -641,12 +658,12 @@ export class ChakartRules extends ChessRules { const afterColor = this.getColor(afterNext[0], afterNext[1]); if ( this.board[afterNext[0]][afterNext[1]] == V.EMPTY || - afterColor != color1 + afterColor == 'a' ) { move.appear[0].x = afterNext[0]; move.appear[0].y = afterNext[1]; if (this.board[afterNext[0]][afterNext[1]] != V.EMPTY) { - // The "object" could also be an opponent's piece + // object = banana, bomb, mushroom or egg const object = this.getPiece(afterNext[0], afterNext[1]); move.vanish.push( new PiPo({