X-Git-Url: https://git.auder.net/js/rpsls.js?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FWormhole.js;h=fcf63b4ed92d732835d2ba50a93a831a64ff15c8;hb=3208c66750e6a677b407267c44c35a395208c196;hp=cc9fd497d32a284a082c815a79a960d6f8443a1b;hpb=c0b036aaf5a2a8e477c955623df2a8e5ce826151;p=vchess.git diff --git a/client/src/variants/Wormhole.js b/client/src/variants/Wormhole.js index cc9fd497..fcf63b4e 100644 --- a/client/src/variants/Wormhole.js +++ b/client/src/variants/Wormhole.js @@ -1,6 +1,7 @@ import { ChessRules } from "@/base_rules"; export class WormholeRules extends ChessRules { + static get HasFlags() { return false; } @@ -39,7 +40,7 @@ export class WormholeRules extends ChessRules { if (['K','k'].includes(row[i])) kings[row[i]]++; if (['x'].concat(V.PIECES).includes(row[i].toLowerCase())) sumElts++; else { - const num = parseInt(row[i]); + const num = parseInt(row[i], 10); if (isNaN(num)) return false; sumElts += num; } @@ -327,4 +328,5 @@ export class WormholeRules extends ChessRules { notation += "=" + move.appear[0].p.toUpperCase(); return notation; } + };