Browse Source

tictactoe: refactored fieldIsEmpty method

tictactoe
Malte Schellhardt 3 years ago
committed by Lorenz Hohmann
parent
commit
85e8867e06
  1. 7
      src/main/java/de/tims/tictactoe/GameLogic.java

7
src/main/java/de/tims/tictactoe/GameLogic.java

@ -37,12 +37,7 @@ public class GameLogic {
}
public boolean fieldIsEmpty(int column, int row) {
if (this.board[column][row] == emptyField) {
System.out.println(Arrays.toString(this.board));
return true;
} else {
return false;
}
return (this.board[column][row] == emptyField) ? true : false;
}
}
Loading…
Cancel
Save