X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FAlice.js;fp=public%2Fjavascripts%2Fvariants%2FAlice.js;h=1cbfccf301ba4d3053fe9446ed6be3e9e4c9fd2a;hp=f7d2fa13422b189e3258bb6a923c8545d582184f;hb=388e4c401f05b1f6a4c54e33c9da9114969a53c0;hpb=375ecdd1387e729f85ed114e82253469e4849869 diff --git a/public/javascripts/variants/Alice.js b/public/javascripts/variants/Alice.js index f7d2fa13..1cbfccf3 100644 --- a/public/javascripts/variants/Alice.js +++ b/public/javascripts/variants/Alice.js @@ -256,8 +256,8 @@ class AliceRules extends ChessRules updateVariables(move) { super.updateVariables(move); //standard king - const piece = this.getPiece(move.start.x,move.start.y); - const c = this.getColor(move.start.x,move.start.y); + const piece = move.vanish[0].p; + const c = move.vanish[0].c; // "l" = Alice king if (piece == "l") { @@ -270,8 +270,8 @@ class AliceRules extends ChessRules unupdateVariables(move) { super.unupdateVariables(move); - const c = this.getColor(move.start.x,move.start.y); - if (this.getPiece(move.start.x,move.start.y) == "l") + const c = move.vanish[0].c; + if (move.vanish[0].p == "l") this.kingPos[c] = [move.start.x, move.start.y]; }