X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FMagnetic.js;h=fedd2492b5cbace83e15503697f4c2684e7288e3;hb=31e9e40ad45faba38612982cfb1d6bdfd98ae20f;hp=c2201d60afa94f12490914c4df8e2977d7583e8b;hpb=910d631b73cad5ffef1b4461157b704e7e7057d8;p=vchess.git diff --git a/client/src/variants/Magnetic.js b/client/src/variants/Magnetic.js index c2201d60..fedd2492 100644 --- a/client/src/variants/Magnetic.js +++ b/client/src/variants/Magnetic.js @@ -136,8 +136,9 @@ export const VariantRules = class MagneticRules extends ChessRules { return true; //TODO: is it right? } - underCheck() { - return false; //there is no check + filterValid(moves) { + // There are no checks + return moves; } getCheckSquares() { @@ -189,7 +190,7 @@ export const VariantRules = class MagneticRules extends ChessRules { const color = this.turn; const kp = this.kingPos[color]; if (kp[0] < 0) - //king disappeared + // King disappeared return color == "w" ? "0-1" : "1-0"; if (this.atLeastOneMove()) // game not over