X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FLosers.js;h=7bd5e5413273e31ccfcbb86ecea3a144c499ebdb;hp=3ac46c2fdee410f1aea42a6940a8f5f6b6a87a06;hb=7e8a7ea1cb66adb4a987badfb0a3c2f99a21bd0a;hpb=31c535953c843b28434a7fcdf7b4da0b376774ab diff --git a/client/src/variants/Losers.js b/client/src/variants/Losers.js index 3ac46c2f..7bd5e541 100644 --- a/client/src/variants/Losers.js +++ b/client/src/variants/Losers.js @@ -3,6 +3,7 @@ import { ArrayFun } from "@/utils/array"; import { randInt } from "@/utils/alea"; export class LosersRules extends ChessRules { + // Trim all non-capturing moves static KeepCaptures(moves) { return moves.filter(m => m.vanish.length == 2 && m.appear.length == 1); @@ -75,4 +76,5 @@ console.log(this.atLeastOneCapture()); // Less material is better (more subtle in fact but...) return -super.evalPosition(); } + };