X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FCapture.js;h=5b286e0e778e9aa232ad3667a86bc13706307702;hp=a43f1671916bbad0bc92a5bcf6fb1f54227c8f3b;hb=3a2a7b5fd3c6bfd0752838094c27e1fb6172d109;hpb=afbf3ca7151ef15a9e579b0f913683ab212396c4 diff --git a/client/src/variants/Capture.js b/client/src/variants/Capture.js index a43f1671..5b286e0e 100644 --- a/client/src/variants/Capture.js +++ b/client/src/variants/Capture.js @@ -5,7 +5,7 @@ import { randInt } from "@/utils/alea"; export const VariantRules = class LosersRules extends ChessRules { // Trim all non-capturing moves static KeepCaptures(moves) { - return moves.filter(m => m.vanish.length == 2); + return moves.filter(m => m.vanish.length == 2 && m.appear.length == 1); } // Stop at the first capture found (if any)