From 34b79fe4fa5aecdfa64742e7ff98a1befffa34ed Mon Sep 17 00:00:00 2001 From: Benjamin Auder <benjamin.auder@somewhere> Date: Sun, 17 Jan 2021 05:31:24 +0100 Subject: [PATCH] Fix non-augmenting self absorptions --- client/src/variants/Selfabsorption.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/variants/Selfabsorption.js b/client/src/variants/Selfabsorption.js index edfa09f5..e7d3c071 100644 --- a/client/src/variants/Selfabsorption.js +++ b/client/src/variants/Selfabsorption.js @@ -10,7 +10,9 @@ export class SelfabsorptionRules extends AbsorptionRules { return ( p1 != p2 && [V.QUEEN, V.ROOK, V.KNIGHT, V.BISHOP].includes(p1) && - [V.QUEEN, V.ROOK, V.KNIGHT, V.BISHOP].includes(p2) + [V.QUEEN, V.ROOK, V.KNIGHT, V.BISHOP].includes(p2) && + (p1 != V.QUEEN || p2 == V.KNIGHT) && + (p2 != V.QUEEN || p1 == V.KNIGHT) ); } -- 2.44.0