From: Benjamin Auder Date: Wed, 26 Feb 2020 00:07:14 +0000 (+0100) Subject: Fix Wildebeest variant X-Git-Url: https://git.auder.net/variants/Cwda/vendor/pieces/%7B%7B?a=commitdiff_plain;h=e3ef199cdac142f1ca14fa6ceb259eb380f63929;p=vchess.git Fix Wildebeest variant --- diff --git a/client/src/variants/Wildebeest.js b/client/src/variants/Wildebeest.js index 27b131d5..1634f494 100644 --- a/client/src/variants/Wildebeest.js +++ b/client/src/variants/Wildebeest.js @@ -117,8 +117,9 @@ export const VariantRules = class WildebeestRules extends ChessRules { const shiftX = color == "w" ? -1 : 1; const startRanks = color == "w" ? [sizeX - 2, sizeX - 3] : [1, 2]; const lastRank = color == "w" ? 0 : sizeX - 1; - const finalPieces = - x + shiftX == lastRank ? [V.ROOK, V.KNIGHT, V.BISHOP, V.QUEEN] : [V.PAWN]; + const finalPieces = x + shiftX == lastRank + ? [V.WILDEBEEST, V.QUEEN] + : [V.PAWN]; if (this.board[x + shiftX][y] == V.EMPTY) { // One square forward