X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FWormhole2.js;fp=client%2Fsrc%2Fvariants%2FWormhole.js;h=06b7fb60d89b335d0ca4ceabfa2b3e82cfb6d45f;hp=05d8f2ae8f84621fb253879aea029136025e3e54;hb=1943de6b9d55716dac4ef8b5672bed803d8d43f9;hpb=c4244fcb06fd281722b57acd499c433150970e47 diff --git a/client/src/variants/Wormhole.js b/client/src/variants/Wormhole2.js similarity index 98% rename from client/src/variants/Wormhole.js rename to client/src/variants/Wormhole2.js index 05d8f2ae..06b7fb60 100644 --- a/client/src/variants/Wormhole.js +++ b/client/src/variants/Wormhole2.js @@ -1,6 +1,6 @@ import { ChessRules } from "@/base_rules"; -export class WormholeRules extends ChessRules { +export class Wormhole2Rules extends ChessRules { static get HasFlags() { return false; @@ -150,7 +150,7 @@ export class WormholeRules extends ChessRules { this.canTake([x, y], sq) ) ) { - moves.push(this.getBasicMove([x, y], sq)); + moves.push(this.getBasicMove([x, y], sq)); } } return moves; @@ -186,7 +186,7 @@ export class WormholeRules extends ChessRules { this.canTake([x, y], [sq[0], sq[1]]) ) { const finalPieces = sq[0] == lastRank - ? [V.ROOK, V.KNIGHT, V.BISHOP, V.QUEEN] + ? V.PawnSpecs.promotions : [V.PAWN]; for (let piece of finalPieces) { moves.push(