X-Git-Url: https://git.auder.net/assets/rpsls.css?a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FGrand.js;h=1409bcc5bb06da2243b44383f9868bd5fdf5fa7a;hb=cf1303697774a12ef9bb154014a38797716944cf;hp=db0543fcb3aa29c3b20ab95ce77f69a7d52e1df8;hpb=8a196305a09269888497995373658f953b9b5bf8;p=vchess.git diff --git a/public/javascripts/variants/Grand.js b/public/javascripts/variants/Grand.js index db0543fc..1409bcc5 100644 --- a/public/javascripts/variants/Grand.js +++ b/public/javascripts/variants/Grand.js @@ -63,8 +63,8 @@ class GrandRules extends ChessRules const V = VariantRules; const [sizeX,sizeY] = VariantRules.size; const shift = (color == "w" ? -1 : 1); - const startRanks = (color == "w" ? [sizeY-2,sizeY-3] : [1,2]); - const lastRanks = (color == "w" ? [0,1,2] : [sizeY-1,sizeY-2,sizeY-3]); + const startRanks = (color == "w" ? [sizeX-2,sizeX-3] : [1,2]); + const lastRanks = (color == "w" ? [0,1,2] : [sizeX-1,sizeX-2,sizeX-3]); if (x+shift >= 0 && x+shift < sizeX && x+shift != lastRanks[0]) { @@ -191,7 +191,6 @@ class GrandRules extends ChessRules if (move.vanish.length==2 && move.appear.length==1 && move.vanish[1].p != VariantRules.PAWN) { - // Capture: update this.captures this.captures[move.vanish[1].c][move.vanish[1].p] = Math.max(0, this.captures[move.vanish[1].c][move.vanish[1].p]-1); }