From: Benjamin Auder Date: Sun, 9 Dec 2018 17:20:42 +0000 (+0100) Subject: Fix kingPos bug when taking en-passant in Atomic X-Git-Url: https://git.auder.net/pieces/Cwda/scripts/doc/rpsls.js?a=commitdiff_plain;h=ffd4c71f82d7aaf8cf330a794f118c5de6f8d6e9;p=vchess.git Fix kingPos bug when taking en-passant in Atomic --- 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"])