X-Git-Url: https://git.auder.net/assets/icon_infos.svg?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FWildebeest.js;h=7a9e35c45239f82baf1957fd98edecaffa3bf21d;hb=2c947b3a9b435b87781d31b0ef6e7744dd81ee1b;hp=526da1a7f37c82b2df26518385481b74699b8c2b;hpb=472c0c4f5aa29d96e080873ebfce2a04f664d852;p=vchess.git diff --git a/client/src/variants/Wildebeest.js b/client/src/variants/Wildebeest.js index 526da1a7..7a9e35c4 100644 --- a/client/src/variants/Wildebeest.js +++ b/client/src/variants/Wildebeest.js @@ -3,6 +3,7 @@ import { ArrayFun } from "@/utils/array"; import { sample, randInt } from "@/utils/alea"; export class WildebeestRules extends ChessRules { + static get size() { return { x: 10, y: 11 }; } @@ -159,7 +160,7 @@ export class WildebeestRules extends ChessRules { for (let epsq of epSquare) { // TODO: some redundant checks if (epsq.x == x + shiftX && Math.abs(epsq.y - y) == 1) { - var enpassantMove = this.getBasicMove([x, y], [epsq.x, epsq.y]); + let enpassantMove = this.getBasicMove([x, y], [epsq.x, epsq.y]); // WARNING: the captured pawn may be diagonally behind us, // if it's a 3-squares jump and we take on 1st passing square const px = this.board[x][epsq.y] != V.EMPTY ? x : x - shiftX; @@ -177,8 +178,6 @@ export class WildebeestRules extends ChessRules { return moves; } - // TODO: wildebeest castle - getPotentialCamelMoves(sq) { return this.getSlideNJumpMoves(sq, V.steps[V.CAMEL], "oneStep"); } @@ -315,4 +314,5 @@ export class WildebeestRules extends ChessRules { " w 0 " + flags + " -" ); } + };