X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=variants%2FWeiqi%2Fclass.js;h=04ad40afb1d9da00d86d3a73747d61d6692e49df;hb=2c8375bb77dda7cbeaee983a09e202436be2191c;hp=714ada8460cd2009b9d292ab99f3f81a9eb754e9;hpb=7bd7cba41f9c2222a29c62ddf8d83fbb46646a1d;p=xogo.git diff --git a/variants/Weiqi/class.js b/variants/Weiqi/class.js index 714ada8..04ad40a 100644 --- a/variants/Weiqi/class.js +++ b/variants/Weiqi/class.js @@ -89,7 +89,7 @@ export default class WeiqiRules extends ChessRules { constructor(o) { super(o); - if (!o.genFenOnly && !o.diagram) { + if (!o.diagram) { this.passListener = () => { if (this.turn == this.playerColor) { let mv = { @@ -137,7 +137,7 @@ export default class WeiqiRules extends ChessRules { if (this.board[x][y] != "" || this.turn != this.playerColor) return null; const color = this.turn; - const oppCol = C.GetOppCol(color); + const oppCol = C.GetOppTurn(color); let move = new Move({ appear: [new PiPo({x: x, y: y, c: color, p: 's'})], vanish: [], @@ -201,7 +201,7 @@ export default class WeiqiRules extends ChessRules { if (move.pass) { if (this.turn != this.playerColor) super.displayMessage(null, "pass", "pass-text", 2000); - this.turn = C.GetOppCol(this.turn); + this.turn = C.GetOppTurn(this.turn); } else super.play(move);