From: Benjamin Auder Date: Sun, 3 May 2020 22:39:04 +0000 (+0200) Subject: Fix Swap variant X-Git-Url: https://git.auder.net/images/doc/%7B%7B%20path%28%27mixstore_user_admin_delete%27%2C%20%7B%20id:%20user.id%20%7D%29%20%7D%7D?a=commitdiff_plain;h=1349f848f772a0fc41efd3648bf065b7172315e7;p=vchess.git Fix Swap variant --- diff --git a/client/src/variants/Swap.js b/client/src/variants/Swap.js index 071b21d4..4d97ae93 100644 --- a/client/src/variants/Swap.js +++ b/client/src/variants/Swap.js @@ -34,7 +34,7 @@ export class SwapRules extends ChessRules { } getPPpath(m) { - if (m.vanish.length == 1) return super.getPPpath(m); + if (m.appear.length == 1) return super.getPPpath(m); // Swap promotion: return m.appear[1].c + m.appear[1].p; }