X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FSuicide.js;h=4bb5d36b7b64e935096dca79bd5ef5396f554394;hb=c583ef1c1dfd19aee88b22c2175202fbdf4dc1c0;hp=24e8ef29608d44c4c4c728697128219367dd8149;hpb=3a2a7b5fd3c6bfd0752838094c27e1fb6172d109;p=vchess.git diff --git a/client/src/variants/Suicide.js b/client/src/variants/Suicide.js index 24e8ef29..4bb5d36b 100644 --- a/client/src/variants/Suicide.js +++ b/client/src/variants/Suicide.js @@ -7,6 +7,10 @@ export const VariantRules = class SuicideRules extends ChessRules { return false; } + static get HasCastle() { + return false; + } + getPotentialPawnMoves([x, y]) { let moves = super.getPotentialPawnMoves([x, y]); @@ -44,15 +48,6 @@ export const VariantRules = class SuicideRules extends ChessRules { return moves; } - getPotentialKingMoves(sq) { - // No castle: - return this.getSlideNJumpMoves( - sq, - V.steps[V.ROOK].concat(V.steps[V.BISHOP]), - "oneStep" - ); - } - // Trim all non-capturing moves (not the most efficient, but easy) static KeepCaptures(moves) { return moves.filter(m => m.vanish.length == 2);