X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FWildebeest.js;h=ef3779ad9beee3423ad141b49f4c8b10aad2b047;hp=783eb440dfdd17d44e812035dbeeb3f84280bc9c;hb=375ecdd1387e729f85ed114e82253469e4849869;hpb=e081ffe361b06ca74db0a36bf72dd73602abf57b diff --git a/public/javascripts/variants/Wildebeest.js b/public/javascripts/variants/Wildebeest.js index 783eb440..ef3779ad 100644 --- a/public/javascripts/variants/Wildebeest.js +++ b/public/javascripts/variants/Wildebeest.js @@ -159,13 +159,12 @@ class WildebeestRules extends ChessRules // TODO: some redundant checks if (epsq.x == x+shift && Math.abs(epsq.y - y) == 1) { - let epStep = epsq.y - y; - var enpassantMove = this.getBasicMove([x,y], [x+shift,y+epStep]); + var enpassantMove = this.getBasicMove([x,y], [x+shift,epsq.y]); enpassantMove.vanish.push({ x: x, - y: y+epStep, + y: epsq.y, p: 'p', - c: this.getColor(x,y+epStep) + c: this.getColor(x,epsq.y) }); moves.push(enpassantMove); }