Skip to content
Snippets Groups Projects
Commit 35a4ec76 authored by Timon Harries's avatar Timon Harries
Browse files

fixed checkForWin board function

parent 83c850be
No related branches found
No related tags found
1 merge request!1Verision 1.0 finished
...@@ -61,7 +61,7 @@ public class Board{ ...@@ -61,7 +61,7 @@ public class Board{
} }
//checks diagonals //checks diagonals
//second try to get the fix pushed //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]); this.setWinner(gameboard[1][1]);
return true; 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