X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=variants%2FSuction%2Fclass.js;h=cf5ae1682b74f56431b25632926c3b4b8bfaf421;hb=f3e90e30b6e7ff416afe288bc9dd865e5daf9860;hp=a66855d407bc1def69668342bb7012addb049911;hpb=6b9320bb6e42ece7694df32f85aab4d2989f6a13;p=xogo.git 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 "*"; }