Fix compilation errors due to enumerations
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user