X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FBenedict.js;h=5584fb870aa6f2239248d580fa0f2e45945ca1f3;hp=40d7a0915744bb3f350ebff0c6e91741b30c82a4;hb=4313762da3237b04f204e121a20cab3ba7bb5dd2;hpb=cee75a57d2f4f89c89d64cefbab55d839a238ed9 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