From 851c2f401deaec4a8171b78108211436ab926220 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Thu, 16 Mar 2023 12:38:59 -0700 Subject: [PATCH] Prevent click redraws while AI is thinking --- src/Board.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Board.java b/src/Board.java index 0c1f5d9..03f22a5 100644 --- a/src/Board.java +++ b/src/Board.java @@ -189,6 +189,7 @@ public class Board { } void handleMouseUp(int x, int y) { + if (aiThinking) return; // Get board coordinate of mouse release BoardCoordinate newCoordinate = new ScreenCoordinate(x, y).toBoard(); // Only do something if new coordinate is different from the originating coordinate