From: Benjamin Auder Date: Thu, 7 Jul 2022 22:57:46 +0000 (+0200) Subject: Fix typo X-Git-Url: https://git.auder.net/game/current/%7B%7B%20asset%28%27mixstore/css/base.css%27%29%20%7D%7D?a=commitdiff_plain;h=518bfb7a260f95e282f763878c2e9cf5ba58ef86;p=xogo.git Fix typo --- diff --git a/base_rules.js b/base_rules.js index 88197ea..2d08bd6 100644 --- a/base_rules.js +++ b/base_rules.js @@ -2340,14 +2340,13 @@ export default class ChessRules { } postPlay(move) { - const color = this.turn; if (this.options["dark"]) this.updateEnlightened(); if (this.options["teleport"]) { if ( this.subTurnTeleport == 1 && move.vanish.length > move.appear.length && - move.vanish[1].c == color + move.vanish[1].c == this.turn ) { const v = move.vanish[move.vanish.length - 1]; this.captured = {x: v.x, y: v.y, c: v.c, p: v.p}; @@ -2362,7 +2361,7 @@ export default class ChessRules { tryChangeTurn(move) { if (this.isLastMove(move)) { - this.turn = C.GetOppCol(color); + this.turn = C.GetOppCol(this.turn); this.movesCount++; this.subTurn = 1; }