Fix isPlayable

This commit is contained in:
Dorian HAMDANI
2025-04-14 10:24:23 +02:00
parent dc843729e0
commit 77becb3492

View File

@@ -116,6 +116,7 @@ public class GomokuCell{
* @return True if the current cell can be played with the condition of the gomoku. * @return True if the current cell can be played with the condition of the gomoku.
*/ */
public boolean isPlayable(){ public boolean isPlayable(){
if (!this.isEmpty()) return false;
for (Cardinal c : Cardinal.values()) { for (Cardinal c : Cardinal.values()) {
GomokuCell current = this.getNeighbour(c); GomokuCell current = this.getNeighbour(c);
if (current != null && current.isPlayed()) return true; if (current != null && current.isPlayed()) return true;