X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FTeleport1.js;fp=client%2Fsrc%2Fvariants%2FTeleport.js;h=faa503aca4876ce6d87f7c2f2baa85b51f61b05a;hp=cbf6a786adbc59c3d2e1a01c068dd66547777ec5;hb=2c9f08fce443d57a70e886242ec391d89e450a7b;hpb=3c9dded7df4334236ab6d83a0210c7f4729e29c1 diff --git a/client/src/variants/Teleport.js b/client/src/variants/Teleport1.js similarity index 99% rename from client/src/variants/Teleport.js rename to client/src/variants/Teleport1.js index cbf6a786..faa503ac 100644 --- a/client/src/variants/Teleport.js +++ b/client/src/variants/Teleport1.js @@ -201,7 +201,7 @@ export class TeleportRules extends ChessRules { this.kingPos[move.vanish[1].c] = [-1, -1]; else if (move.appear[0].p == V.KING) this.kingPos[move.appear[0].c] = [move.appear[0].x, move.appear[0].y]; - this.updateCastleFlags(move); + if (move.vanish.length > 0) this.updateCastleFlags(move); } // NOTE: no need to update if castleFlags already off