Skip to content
Snippets Groups Projects
Commit 07640336 authored by Timon Harries's avatar Timon Harries Committed by Nick
Browse files

fixed checkForWin board function

parent adc6b498
No related branches found
No related tags found
1 merge request!2Fehler fix
......@@ -61,7 +61,7 @@ public class Board{
}
//checks diagonals
//second try to get the fix pushed
if((gameboard[0][0] == gameboard[1][1] && gameboard[0][0] == gameboard[2][2]) || (gameboard[0][2] == gameboard[1][1] && gameboard[1][1] != '#') && gameboard[0][2] == gameboard[2][0] ) {
if((gameboard[0][0] == gameboard[1][1] && gameboard[0][0] == gameboard[2][2] && gameboard[1][1] != '#') || (gameboard[0][2] == gameboard[1][1] && gameboard[0][2] == gameboard[2][0] && gameboard[1][1] != '#')) {
this.setWinner(gameboard[1][1]);
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment