X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FWormhole.js;h=76f6d127ad5de4acff7b6587abd0818fb6c7fb79;hp=b04efa94c288a6edd5b7151c8f3f0fa7f3510727;hb=a97bdbda4ecf83645d409b717e36828784d1450d;hpb=e2d2b49c4b8f5228126991ac5cf41086a51a4285 diff --git a/client/src/variants/Wormhole.js b/client/src/variants/Wormhole.js index b04efa94..76f6d127 100644 --- a/client/src/variants/Wormhole.js +++ b/client/src/variants/Wormhole.js @@ -264,6 +264,8 @@ export const VariantRules = class WormholeRules extends ChessRules { return this.isAttackedByJump(sq, colors, V.KING, V.steps[V.KING]); } + // NOTE: altering move in getBasicMove doesn't work and wouldn't be logical. + // This is a side-effect on board generated by the move. static PlayOnBoard(board, move) { board[move.vanish[0].x][move.vanish[0].y] = V.HOLE; for (let psq of move.appear) board[psq.x][psq.y] = psq.c + psq.p;