X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FAlice.js;h=5aa9ee8182ccc3d3f3cbda7e726ab2b11ca34ade;hb=cf1303697774a12ef9bb154014a38797716944cf;hp=b7f5a3e1cd77ab191dea341bfe9d82d72fa9f7fb;hpb=efb20746c30ac26f258f9c5de6dfb70b91980de4;p=vchess.git diff --git a/public/javascripts/variants/Alice.js b/public/javascripts/variants/Alice.js index b7f5a3e1..5aa9ee81 100644 --- a/public/javascripts/variants/Alice.js +++ b/public/javascripts/variants/Alice.js @@ -223,7 +223,7 @@ class AliceRules extends ChessRules const mirrorSide = sideBoard[0][kp[0]][kp[1]] != VariantRules.EMPTY ? 1 : 2; let saveBoard = this.board; this.board = sideBoard[mirrorSide-1]; - let res = this.isAttacked(kp, this.getOppCol(color)); + let res = this.isAttacked(kp, [this.getOppCol(color)]); this.board = saveBoard; this.undoSide(move, sideBoard); return res; @@ -239,7 +239,7 @@ class AliceRules extends ChessRules let sideBoard = this.getSideBoard(mirrorSide); let saveBoard = this.board; this.board = sideBoard; - let res = this.isAttacked(this.kingPos[color], this.getOppCol(color)) + let res = this.isAttacked(this.kingPos[color], [this.getOppCol(color)]) ? [ JSON.parse(JSON.stringify(this.kingPos[color])) ] : [ ]; this.board = saveBoard; @@ -279,7 +279,7 @@ class AliceRules extends ChessRules let saveBoard = this.board; this.board = sideBoard; let res = "*"; - if (!this.isAttacked(this.kingPos[color], this.getOppCol(color))) + if (!this.isAttacked(this.kingPos[color], [this.getOppCol(color)])) res = "1/2"; else res = (color == "w" ? "0-1" : "1-0");