From 77becb3492f246e665017c8acf2912e52dd72871 Mon Sep 17 00:00:00 2001 From: Dorian HAMDANI Date: Mon, 14 Apr 2025 10:24:23 +0200 Subject: [PATCH] Fix isPlayable --- src/GomokuCell.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GomokuCell.java b/src/GomokuCell.java index b00f055..ba144c3 100644 --- a/src/GomokuCell.java +++ b/src/GomokuCell.java @@ -116,6 +116,7 @@ public class GomokuCell{ * @return True if the current cell can be played with the condition of the gomoku. */ public boolean isPlayable(){ + if (!this.isEmpty()) return false; for (Cardinal c : Cardinal.values()) { GomokuCell current = this.getNeighbour(c); if (current != null && current.isPlayed()) return true;