X-Git-Url: https://git.auder.net/img/vendor/vue.min.js?a=blobdiff_plain;f=variants%2FAllmate%2Fclass.js;h=e491e6d4438138f5b2b42190ba749e0ce526d1d8;hb=616a8d7ae5ee96fe23d393cf6e4554b2cf3b9245;hp=8c5a92cae2cec6134bdf8fba398e928181950aeb;hpb=5f08c59b29c2173cc8b2df1a3799ee971a14e691;p=xogo.git diff --git a/variants/Allmate/class.js b/variants/Allmate/class.js index 8c5a92c..e491e6d 100644 --- a/variants/Allmate/class.js +++ b/variants/Allmate/class.js @@ -18,9 +18,6 @@ export default class AllmateRules extends ChessRules { get hasEnpassant() { return false; } - get hasMoveStack() { - return true; - } setOtherVariables(fenParsed) { super.setOtherVariables(fenParsed); @@ -38,7 +35,7 @@ export default class AllmateRules extends ChessRules { if (move.appear.length > 0) this.curMove = move; const color = this.turn; - const oppCol = C.GetOppCol(this.turn); + const oppCol = C.GetOppTurn(this.turn); let mv = new Move({ start: this.curMove.end, end: this.curMove.end, @@ -61,8 +58,8 @@ export default class AllmateRules extends ChessRules { // is piece on square x,y mated by color? isMated(x, y, color) { - const myColor = C.GetOppCol(color); - if (!this.underCheck([x, y], color)) + const myColor = C.GetOppTurn(color); + if (!super.underAttack([x, y], color)) return false; for (let i=0; i