X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FShogi.js;h=9104ed92d70ea59b64b95ac72bbfbcd3f06170ce;hb=ded43c88fad60fd8f9bb46aabd67f3f2092f65f3;hp=e8b179185db972d187407d2e9755b605a55437fe;hpb=7e8a7ea1cb66adb4a987badfb0a3c2f99a21bd0a;p=vchess.git diff --git a/client/src/variants/Shogi.js b/client/src/variants/Shogi.js index e8b17918..9104ed92 100644 --- a/client/src/variants/Shogi.js +++ b/client/src/variants/Shogi.js @@ -16,6 +16,10 @@ export class ShogiRules extends ChessRules { return true; } + get showFirstTurn() { + return true; + } + static get Notoodark() { return true; } @@ -308,7 +312,7 @@ export class ShogiRules extends ChessRules { case V.LANCE: return this.getPotentialLanceMoves([x, y]); case V.KING: - return this.getPotentialKingMoves([x, y]); + return super.getPotentialKingMoves([x, y]); case V.P_ROOK: return this.getPotentialDragonMoves([x, y]); case V.P_BISHOP: @@ -447,14 +451,6 @@ export class ShogiRules extends ChessRules { ); } - getPotentialKingMoves(sq) { - return this.getSlideNJumpMoves( - sq, - V.steps[V.ROOK].concat(V.steps[V.BISHOP]), - { oneStep: true } - ); - } - isAttacked(sq, color) { return ( this.isAttackedByPawn(sq, color) ||