Tic-Tac-Toe

posted by: Ms. Martin 4 March 2010 No Comment

You will write a very incomplete Tic-Tac-Toe class to practice using two-dimensional arrays, otherwise known as matrices. Read these notes if you need some help and make sure you follow style guidelines listed!

Your class will need to have at least the following:

  • Constructor
  • makeMove(int r, int c, String symbol) (pre: grid square is empty; post: symbol placed in grid square)
  • toString:
    |O  |
    |XX |
    | O |
    

For an added challenge, check whether a square is valid, alternate between players, write a client that allows a user to input a move…

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>