Hello all, This latest project has me at a loss. Not sure where to go from here. My instructions are to (A) add a new method named getOutcome that returns an Outcome enumeration. (B) In the takeTurn method, use the getOutcome method to determine whether to continue the game.(C) In the takeTurn method, display a dialog message that displays the winner or tie when the game ends. Optionally,you can clear the board and start a new game after it ends. Note: display a dialog message in the current window: JOptionPane.showMessageDialog (this, "Both players tie.");
Here is what I have so far, I can display the board and apply Nought and Cross but I am unable to work through the game and determine a winner or tie.
CodeRanch Pro Tip: If you search the Java Forums for "Tic Tac Toe" or "Noughts and Crosses" plus win, lose, tie, end, or game you will find that this topic has been discussed before and you may be able to glean some insight into how to solve your problem.
All things are lawful, but not all things are profitable.