From ffd4c71f82d7aaf8cf330a794f118c5de6f8d6e9 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Sun, 9 Dec 2018 18:20:42 +0100
Subject: [PATCH] Fix kingPos bug when taking en-passant in Atomic

---
 public/javascripts/variants/Atomic.js | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

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"])
-- 
2.44.0