Fix compilation errors due to enumerations

This commit is contained in:
Dorian HAMDANI
2025-05-09 19:34:18 +02:00
parent ad36d35b01
commit 636df8242e
2 changed files with 5 additions and 5 deletions

View File

@@ -109,10 +109,10 @@ public class GomokuAI extends Player {
switch (this.color) { switch (this.color) {
case Color.WHITE: case WHITE:
gomokuCell.setState(Color.BLACK); gomokuCell.setState(Color.BLACK);
break; break;
case Color.BLACK: case BLACK:
gomokuCell.setState(Color.WHITE); gomokuCell.setState(Color.WHITE);
break; break;
default: default:

View File

@@ -239,9 +239,9 @@ public class GomokuCell {
@Override @Override
public String toString() { public String toString() {
switch (this.getState()) { switch (this.getState()) {
case Color.NIL: return "."; case NIL: return ".";
case Color.BLACK: return "X"; case BLACK: return "X";
case Color.WHITE: return "O"; case WHITE: return "O";
default: default:
throw new IllegalStateException("Unexpected value: " + this.getState()); throw new IllegalStateException("Unexpected value: " + this.getState());
} }