|
@ -69,7 +69,13 @@ public class GameLogic { |
|
|
if (board[i][j] == player) countFields++; |
|
|
if (board[i][j] == player) countFields++; |
|
|
} |
|
|
} |
|
|
if(countFields == this.board.length) return finished = true; |
|
|
if(countFields == this.board.length) return finished = true; |
|
|
|
|
|
countFields = 0; |
|
|
|
|
|
|
|
|
|
|
|
// check diagonal right |
|
|
|
|
|
for (int i = this.board.length - 1, j = 0; i >= 0 ; i--, j++) { |
|
|
|
|
|
if (board[i][j] == player) countFields++; |
|
|
|
|
|
} |
|
|
|
|
|
if(countFields == this.board.length) return finished = true; |
|
|
|
|
|
|
|
|
return finished; |
|
|
return finished; |
|
|
} |
|
|
} |
|
|