From: Benjamin Auder Date: Mon, 8 Feb 2021 19:27:28 +0000 (+0100) Subject: Prevent playing on opponent's turn in Avalanche X-Git-Url: https://git.auder.net/doc/html/scripts/img/current/%3C?a=commitdiff_plain;h=cfeaa4a1149ef71f12789c958f40c6cc7177bbd7;p=vchess.git Prevent playing on opponent's turn in Avalanche --- diff --git a/client/src/variants/Avalanche.js b/client/src/variants/Avalanche.js index edeb5648..17e21380 100644 --- a/client/src/variants/Avalanche.js +++ b/client/src/variants/Avalanche.js @@ -25,6 +25,7 @@ export class AvalancheRules extends ChessRules { } canIplay(side, [x, y]) { + if (side != this.turn) return false; if (this.subTurn == 0) return (x >= V.size.x); const c = this.getColor(x, y); return (