X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FCheckered.js;h=79ea63c44a3fc6bd24b71aebf4d2511031d41d12;hp=bca365d097a11a374d499244cbe5aefe0a1c3539;hb=2c5d7b20742b802d9c47916915c1114bcfc9a9c3;hpb=9edfb7146fdc4dd08914b2a117d2852e705353aa diff --git a/client/src/variants/Checkered.js b/client/src/variants/Checkered.js index bca365d0..79ea63c4 100644 --- a/client/src/variants/Checkered.js +++ b/client/src/variants/Checkered.js @@ -303,7 +303,8 @@ export class CheckeredRules extends ChessRules { } isAttackedByBishop(sq, colors) { - return this.isAttackedBySlideNJump(sq, colors, V.BISHOP, V.steps[V.BISHOP]); + return this.isAttackedBySlideNJump( + sq, colors, V.BISHOP, V.steps[V.BISHOP]); } isAttackedByQueen(sq, colors) { @@ -337,7 +338,7 @@ export class CheckeredRules extends ChessRules { "c" ]); let res = kingAttacked - ? [JSON.parse(JSON.stringify(this.kingPos[color]))] //need to duplicate! + ? [JSON.parse(JSON.stringify(this.kingPos[color]))] : []; this.turn = color; return res;