Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Apr 19, 2013

GWC CS G153 Java Project 05 - Due 4/26/2013

Requirements
P7.13 Add a method getWinner to the TicTacToe class of Section 7.8. It should return "x" or "o" to indicate a winner, or " " if there is no winner yet. Recall that a winning position has three matching marks in a row, column, or diagonal.
Disclaimer

  • There are many ways to solve a problem.
  • I do not post codes before the due date, since that does not help you.
  • Codes may be incorrect because I am also a learner like you. Use it at your discretion.
 Guidelines 
1. Your method should perform 4 checks
  • Check each row.
  • Check each column.
  • Check top-left to bottom-right diagonal.
  • Check top-right to bottom-left diagonal. 
2. In the game runner
  • Check for occupied space, if a space on the board is occupied, player should be prompted to select new row and column.
  • Check total moves to print a draw result