X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=variants%2FAllmate%2Fclass.js;h=9493e6c30e4fc0f59cd7794859518182acc404d7;hb=4fcd7ab062f5250757804d633df01bd0d06da137;hp=5b237c0f4cb53ee45cab32e6eccce3b05c3b9646;hpb=f3e90e30b6e7ff416afe288bc9dd865e5daf9860;p=xogo.git diff --git a/variants/Allmate/class.js b/variants/Allmate/class.js index 5b237c0..9493e6c 100644 --- a/variants/Allmate/class.js +++ b/variants/Allmate/class.js @@ -35,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, @@ -58,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 (!super.underAttack([x, y], color)) + const myColor = C.GetOppTurn(color); + if (!super.underAttack([x, y], [color])) return false; for (let i=0; i