Merge pull request #217 from olliehcrook/patch-3

Update Board.java
This commit is contained in:
Jeff Atwood
2021-03-07 19:28:30 -08:00
committed by GitHub

View File

@@ -75,7 +75,15 @@ public class Board {
return false;
}
public boolean checkDraw() {
if(this.checkWin('X') == false && this.checkWin('O') == false) {
if(this.getBoardValue(1) != ' ' && this.getBoardValue(2) != ' ' && this.getBoardValue(3) != ' ' && this.getBoardValue(4) != ' ' && this.getBoardValue(5) != ' ' && this.getBoardValue(6) != ' ' && this.getBoardValue(7) != ' ' && this.getBoardValue(8) != ' ' && this.getBoardValue(9) != ' ' ) {
return true;
}
}
return false;
}
/**
* Reset the board
*/
@@ -85,4 +93,4 @@ public class Board {
}
}
}
}