X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=variants%2FCheckless%2Fclass.js;h=0e24b77fccd349c003749ff47bd838230e3d05c9;hb=f57232cdb4ea7c7b5fab1c7ef23c26714d26501e;hp=bc8518481d5f6c3b4ce862801dc64e17857a4dd5;hpb=de1421be3ee53cb4ea8f112834d3de7a863fdd40;p=xogo.git diff --git a/variants/Checkless/class.js b/variants/Checkless/class.js index bc85184..0e24b77 100644 --- a/variants/Checkless/class.js +++ b/variants/Checkless/class.js @@ -24,7 +24,7 @@ export default class ChecklessRules extends ChessRules { } filterValid(moves) { - fmoves = super.filterValid(moves); + const fmoves = super.filterValid(moves); // Filter out moves giving check but not checkmate const color = this.turn; const oppCol = C.GetOppTurn(color); @@ -35,7 +35,7 @@ export default class ChecklessRules extends ChessRules { const res = this.trackKingWrap(m, oppKingPos, (oppKp) => { return ( !this.underCheck(oppKp, [color]) || - this.atLeastOneMove_aux(oppKp, kingPos, oppCol, color) + !this.atLeastOneMove_aux(oppKp, kingPos, oppCol, color) ); }); this.undoOnBoard(m);