From cfeaa4a1149ef71f12789c958f40c6cc7177bbd7 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Mon, 8 Feb 2021 20:27:28 +0100
Subject: [PATCH] Prevent playing on opponent's turn in Avalanche

---
 client/src/variants/Avalanche.js | 1 +
 1 file changed, 1 insertion(+)

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 (
-- 
2.44.0