X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FShogi.js;fp=client%2Fsrc%2Fvariants%2FShogi.js;h=5f85e75316d5894e2f3d4726bfbc60d089c49957;hp=1526aabd2cc3a7b9c1b362cf4fcfc5906174482b;hb=45731a7c47d0d9ff6cb9b4cecb2b609f286c2f45;hpb=81452d4dd5d64d93322c6ba090c6e357e65a68fb diff --git a/client/src/variants/Shogi.js b/client/src/variants/Shogi.js index 1526aabd..5f85e753 100644 --- a/client/src/variants/Shogi.js +++ b/client/src/variants/Shogi.js @@ -490,13 +490,13 @@ export class ShogiRules extends ChessRules { return false; } - isAttackedBySilver([x, y], color) { + isAttackedBySilver(sq, color) { const shift = (color == 'w' ? 1 : -1); return this.isAttackedBySlideNJump( sq, color, V.SILVER, V.steps[V.BISHOP].concat([ [shift, 0] ]), 1); } - isAttackedByPawn([x, y], color) { + isAttackedByPawn(sq, color) { const shift = (color == 'w' ? 1 : -1); return this.isAttackedBySlideNJump(sq, color, V.PAWN, [ [shift, 0] ], 1); }