From: Benjamin Auder Date: Wed, 12 May 2021 10:58:34 +0000 (+0200) Subject: Fix promotions in Pandemonium1 X-Git-Url: https://git.auder.net/css/vendor/img/current/%3C?a=commitdiff_plain;h=ec4921ef23bd92a4be7d3934bdf47528d22a6b2e;p=vchess.git Fix promotions in Pandemonium1 --- diff --git a/TODO b/TODO index 9706a013..d914089b 100644 --- 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) diff --git a/client/src/variants/Pandemonium1.js b/client/src/variants/Pandemonium1.js index aef9c06a..08092191 100644 --- a/client/src/variants/Pandemonium1.js +++ b/client/src/variants/Pandemonium1.js @@ -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)) {