homework help

i need help writing a simple tic tac toe program

Page 1 of 1

4 Replies - 1146 Views - Last Post: 15 April 2008 - 08:21 PM Rate Topic: -----

#1 bigphilly08  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 15-April 08

homework help

Post icon  Posted 15 April 2008 - 07:48 PM

I am in java programming class at high school and was given this homework assignment:

Create a class TicTacToe that will enable you to write a complete program to play the game tic-tac-toe. The class contains a private 3 by 3 two-dimensional array of integers. The constructor should initialize the empty board to all zeros. Allow two human players. Wherever the first player moves, place a 1 in the specified square, and place a 2 wherever the second player moves. Each move must be to an empty square. After each move, determine whether the game has been won and whether it is draw.

It is a simple program a know but my teacher doesn't do a good job teaching it, so I decided to get outside help. If anyone can help me and add comments in the program so I know what does what action that would be great.

Is This A Good Question/Topic? 0
  • +

Replies To: homework help

#2 Nykc  Icon User is offline

  • Gentleman of Leisure
  • member icon

Reputation: 726
  • View blog
  • Posts: 8,638
  • Joined: 14-September 07

Re: homework help

Posted 15 April 2008 - 07:50 PM

Go ahead and search these forums, this appears to be a common topic lately.
Was This Post Helpful? 0
  • +
  • -

#3 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5226
  • View blog
  • Posts: 27,003
  • Joined: 10-May 07

Re: homework help

Posted 15 April 2008 - 07:50 PM

View Postbigphilly08, on 15 Apr, 2008 - 10:48 PM, said:

It is a simple program a know but my teacher doesn't do a good job teaching it, so I decided to get outside help. If anyone can help me and add comments in the program so I know what does what action that would be great.

What exactly do you need help with? Do you have any specific areas that you are not understanding?

Please post your code along with any questions that you may have. No matter how bad your instructor is, I'm sure you can get a head start on this project.

:code:
Was This Post Helpful? 0
  • +
  • -

#4 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8327
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: homework help

Posted 15 April 2008 - 08:04 PM

Sorry we do not do people's homework for them. We ask that you show your "best effort" in solving the problem yourself. When you get stuck then you can provide us the code you have written so far along with a problem statement and any error messages you are getting.

So please show us what you have so far and we will be more than happy to help you out. Thanks a bunch!
But you are lucky there is surely a TTT demo in the Code Snippets
Was This Post Helpful? 0
  • +
  • -

#5 bigphilly08  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 15-April 08

Re: homework help

Posted 15 April 2008 - 08:21 PM

well the thing is that my teacher will help me with the code by simply giving me the answer and telling me exactly how to write the code. I will write up as much of the code I can do and tomorrow i will post the code
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1