X-Git-Url: https://git.auder.net/?p=xogo.git;a=blobdiff_plain;f=variants%2FSuction%2Fclass.js;h=cf5ae1682b74f56431b25632926c3b4b8bfaf421;hp=a66855d407bc1def69668342bb7012addb049911;hb=f3e90e30b6e7ff416afe288bc9dd865e5daf9860;hpb=a548cb4e3ad8099e977da9bb4a4184973beb56e3 diff --git a/variants/Suction/class.js b/variants/Suction/class.js index a66855d..cf5ae16 100644 --- a/variants/Suction/class.js +++ b/variants/Suction/class.js @@ -107,8 +107,8 @@ export default class SuctionRules extends ChessRules { getCurrentScore() { const color = this.turn; const kingPos = super.searchKingPos(color); - if (color == "w" && kingPos[0] == 0) return "0-1"; - if (color == "b" && kingPos[0] == this.size.x - 1) return "1-0"; + if (color == "w" && kingPos[0][0] == 0) return "0-1"; + if (color == "b" && kingPos[0][0] == this.size.x - 1) return "1-0"; // King is not on the opposite edge: game not over return "*"; }