X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FHorde.js;h=aac4d27a4c111847cb4319ec5c966ae9692b726d;hp=6305c412a5b1ebde239b8e8f669a677ed9a49c76;hb=af34341d92d47d14f396e7f4adb81f2a7e9d9a61;hpb=fef153df51fe60a5af4c5b2a05e0b1177187bf62 diff --git a/client/src/variants/Horde.js b/client/src/variants/Horde.js index 6305c412..aac4d27a 100644 --- a/client/src/variants/Horde.js +++ b/client/src/variants/Horde.js @@ -51,8 +51,8 @@ export class HordeRules extends ChessRules { return super.filterValid(moves); } - getCheckSquares(color) { - if (color == 'w') return []; + getCheckSquares() { + if (this.turn == 'w') return []; return ( this.underCheck('b') ? [JSON.parse(JSON.stringify(this.kingPos['b']))]