Fix promotions in Pandemonium1
authorBenjamin Auder <benjamin.auder@somewhere>
Wed, 12 May 2021 10:58:34 +0000 (12:58 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Wed, 12 May 2021 10:58:34 +0000 (12:58 +0200)
TODO
client/src/variants/Pandemonium1.js

diff --git a/TODO b/TODO
index 9706a01..d914089 100644 (file)
--- a/TODO
+++ b/TODO
@@ -41,3 +41,8 @@ Power Sharing
 Rules: Two adjacent pieces of the same color can share their movement. Adjacency includes diagonals, sharing ends once pieces are separated, and sharing can be used to check, capture pieces, and promote pawns.
 (+ pawns and king ?!)
 TheGoatMan Discord https://discord.com/channels/686736099959504907/687076968046395410/836274318480113686
+
+https://www.chessvariants.com/rules/canoness-chess
++ https://discord.com/channels/686736099959504907/686736100416553055/841432354676670524
+
+Non-Prise chess (from list http://www.pathguy.com/chess/chessvar.html)
index aef9c06..0809219 100644 (file)
@@ -73,7 +73,8 @@ export class Pandemonium1Rules extends Pandemonium2Rules {
   }
 
   applyPromotions(moves, promoted) {
-    const lastRanks = (this.turn == 'w' ? [0, 1] : [V.size.x - 1, V.size.x]);
+    const lastRanks =
+      (this.turn == 'w' ? [0, 1] : [V.size.x - 1, V.size.x - 2]);
     let promotions = [];
     moves.forEach(m => {
       if (lastRanks.includes(m.start.x) || lastRanks.includes(m.end.x)) {