X-Git-Url: https://git.auder.net/?p=xogo.git;a=blobdiff_plain;f=variants%2FBenedict%2Fclass.js;h=81fee87e5eb8e0e841ca84ca632ca61b30ef1e39;hp=bbaf8e9522c2b553b14e06a54264d719a37c1041;hb=437dfd42748eb2359103fd87a7d0e780121a7865;hpb=f77da909dea9da0992a23a92b48d8f08703b4f72 diff --git a/variants/Benedict/class.js b/variants/Benedict/class.js index bbaf8e9..81fee87 100644 --- a/variants/Benedict/class.js +++ b/variants/Benedict/class.js @@ -35,13 +35,13 @@ export default class BenedictRules extends ChessRules { const attacks = specs.attack || specs.moves; for (let a of attacks) { outerLoop: for (let step of a.steps) { - let [i, j] = [x + step[0], this.computeY(y + step[1])]; + let [i, j] = [x + step[0], this.getY(y + step[1])]; let nbSteps = 1; while (this.onBoard(i, j) && this.board[i][j] == "") { if (a.range <= nbSteps++) continue outerLoop; i += step[0]; - j = this.computeY(j + step[1]); + j = this.getY(j + step[1]); } if ( this.onBoard(i, j) && this.getColor(i, j) == oppCol &&