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

Fixed board constructor

parent d115c016
No related branches found
No related tags found
1 merge request!2Fehler fix
......@@ -18,7 +18,7 @@ public class TicTacToe {
public static void main(String[] args) {
TicTacToe game = new TicTacToe();
game.startGame();
System.out.println("Debug help Nullpointer exception");
while (!board.checkForWin()){
......
......@@ -5,11 +5,13 @@ public class Board{
char winner;
public Board(){
char[][] board = new char[3][3];
for(int i = 0; i < 3; i++){
for(int j = 0; j < 3; j++){
gameboard[i][j] = '#';
board[i][j] = '#';
}
}
gameboard = board;
winner = '#';
}
......
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