From 636df8242e65280a7e766f4ac09a10cca17c3db2 Mon Sep 17 00:00:00 2001 From: Dorian HAMDANI Date: Fri, 9 May 2025 19:34:18 +0200 Subject: [PATCH] Fix compilation errors due to enumerations --- src/GomokuAI.java | 4 ++-- src/GomokuCell.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/GomokuAI.java b/src/GomokuAI.java index 8c8de09..1fc811b 100644 --- a/src/GomokuAI.java +++ b/src/GomokuAI.java @@ -109,10 +109,10 @@ public class GomokuAI extends Player { switch (this.color) { - case Color.WHITE: + case WHITE: gomokuCell.setState(Color.BLACK); break; - case Color.BLACK: + case BLACK: gomokuCell.setState(Color.WHITE); break; default: diff --git a/src/GomokuCell.java b/src/GomokuCell.java index 5e1a292..a936ecc 100644 --- a/src/GomokuCell.java +++ b/src/GomokuCell.java @@ -239,9 +239,9 @@ public class GomokuCell { @Override public String toString() { switch (this.getState()) { - case Color.NIL: return "."; - case Color.BLACK: return "X"; - case Color.WHITE: return "O"; + case NIL: return "."; + case BLACK: return "X"; + case WHITE: return "O"; default: throw new IllegalStateException("Unexpected value: " + this.getState()); }