X-Git-Url: https://git.auder.net/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fvariants%2FCannibal.js;h=f7a9514969b40ada8859bec98f3de2fa9035802f;hb=472c0c4f5aa29d96e080873ebfce2a04f664d852;hp=b66ac3827478457f81609f67531c3acbe2c807a7;hpb=305ede7ec3753fc669b7c86af5b5c5b2fc78a164;p=vchess.git diff --git a/client/src/variants/Cannibal.js b/client/src/variants/Cannibal.js index b66ac382..f7a95149 100644 --- a/client/src/variants/Cannibal.js +++ b/client/src/variants/Cannibal.js @@ -207,8 +207,9 @@ export class CannibalRules extends ChessRules { this.kingPos[c][0] = move.appear[0].x; this.kingPos[c][1] = move.appear[0].y; this.castleFlags[c] = [V.size.y, V.size.y]; - return; } + // Next call is still required because the king may eat an opponent's rook + // TODO: castleFlags will be turned off twice then. super.updateCastleFlags(move, piece); } @@ -231,10 +232,6 @@ export class CannibalRules extends ChessRules { }; } - static get SEARCH_DEPTH() { - return 4; - } - getNotation(move) { let notation = super.getNotation(move); const lastRank = (move.appear[0].c == "w" ? 0 : 7);