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