X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FBenedict.js;h=5584fb870aa6f2239248d580fa0f2e45945ca1f3;hb=89a6214b27561878670914a65902aa51682efe61;hp=40d7a0915744bb3f350ebff0c6e91741b30c82a4;hpb=7e8a7ea1cb66adb4a987badfb0a3c2f99a21bd0a;p=vchess.git diff --git a/client/src/variants/Benedict.js b/client/src/variants/Benedict.js index 40d7a091..5584fb87 100644 --- a/client/src/variants/Benedict.js +++ b/client/src/variants/Benedict.js @@ -14,22 +14,8 @@ export class BenedictRules extends ChessRules { ); } - // TODO(?): some duplicated code in 2 next functions - getSlideNJumpMoves([x, y], steps, oneStep) { - let moves = []; - outerLoop: for (let loop = 0; loop < steps.length; loop++) { - const step = steps[loop]; - let i = x + step[0]; - let j = y + step[1]; - while (V.OnBoard(i, j) && this.board[i][j] == V.EMPTY) { - moves.push(this.getBasicMove([x, y], [i, j])); - if (oneStep) continue outerLoop; - i += step[0]; - j += step[1]; - } - // No capture check: handled elsewhere (next method) - } - return moves; + canTake() { + return false; } // Find possible captures from a square