tic tac toe - Tic Tac Toe Game (Java): finding a tie game -


To make a tic tac toe game for my class, I have all other ways right and the game works by then Unless there is no draw. The board is a 2D array that represents the Tic Tac toe toe board. Whether the board is completed or not, it is the complete method to try and view:

  public boolean full () {bullion full = false; For {int i = 0; i   

I know that this does not work, I could not really think of any way to do it. Anyone have any ideas?

You will have to break out of loops (or withdrawals) when you find out that the board is not complete.

  public boolean completion (for (int i = 0; i & lt; 3; i ++) {for (int j = 0; j & lt; 3; j + +) {If (board [i] [j] == '-') {return false;}}} be true;}    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -