X-Git-Url: https://git.auder.net/doc/screen_ranking.png?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FPandemonium.js;h=496e2870232df5fb5198517d207d731ad7796386;hb=e85bddc13ff00ef1fc13f33795ad7a2293c2f08d;hp=1291eda106f234058fbf9650740768f69fea525d;hpb=b2e8c34e0158f512741d67b8a1c25425e0b8747e;p=vchess.git diff --git a/client/src/variants/Pandemonium.js b/client/src/variants/Pandemonium.js index 1291eda1..496e2870 100644 --- a/client/src/variants/Pandemonium.js +++ b/client/src/variants/Pandemonium.js @@ -14,6 +14,11 @@ export class PandemoniumRules extends ChessRules { ); } + loseOnRepetition() { + // If current side is under check: lost + return this.underCheck(this.turn); + } + static get GILDING() { return "g"; } @@ -324,7 +329,7 @@ export class PandemoniumRules extends ChessRules { return []; } // Normal move (after initial setup) - if (x >= V.size.x) return this.getReserveMoves(x, y); + if (x >= V.size.x) return this.getReserveMoves([x, y]); const p = this.getPiece(x, y); const sq = [x, y]; let moves = []; @@ -604,7 +609,8 @@ export class PandemoniumRules extends ChessRules { s: 'n', h: 'b', w: 'c', - a: 'm' + a: 'm', + g: 'p' }; }