X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FAtomic.js;fp=public%2Fjavascripts%2Fvariants%2FAtomic.js;h=21fbedb2a9b12f1b5a4ebe758de4514741d2ab59;hb=ffd4c71f82d7aaf8cf330a794f118c5de6f8d6e9;hp=997a70e106c9c32ebf01ac92151a5226ca8d59e5;hpb=1dcf83e8cbf9dcaf25e47d269ba5e22c074d8efc;p=vchess.git diff --git a/public/javascripts/variants/Atomic.js b/public/javascripts/variants/Atomic.js index 997a70e1..21fbedb2 100644 --- a/public/javascripts/variants/Atomic.js +++ b/public/javascripts/variants/Atomic.js @@ -60,9 +60,7 @@ class AtomicRules extends ChessRules { super.updateVariables(move); const color = this.getColor(move.start.x,move.start.y); - // Next condition to avoid conflicts with harmless castle moves - if (color != this.getColor(move.end.x,move.end.y) - && this.board[move.end.x][move.end.y] != VariantRules.EMPTY) + if (move.appear.length == 0) //capture { const firstRank = {"w": 7, "b": 0}; for (let c of ["w","b"])