X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=variants%2FAllmate%2Fclass.js;h=9493e6c30e4fc0f59cd7794859518182acc404d7;hb=66ab134b7ab3ba00204fb316ba7636c904331d6c;hp=8c5a92cae2cec6134bdf8fba398e928181950aeb;hpb=5f08c59b29c2173cc8b2df1a3799ee971a14e691;p=xogo.git diff --git a/variants/Allmate/class.js b/variants/Allmate/class.js index 8c5a92c..9493e6c 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