Author |
Message |
rahman200012
|
Posted: Mon Jan 07, 2008 9:11 pm Post subject: Tic Tac Toe Program |
|
|
Hello programmers =P. I need help on a tic tac toe program for my grade 11 project. Could anyone help me find any ways about tackling this project. Bare in mind that my knowledge is very limited to Java and I have only been recently been introduced to arrays and methods. My class is using an older version of Java (i.e. c.readInt). We do not use system.out. Any input would be pleasantly appreciated. Anyways the outline for my project is attached to this post.
Description: |
|
Download |
Filename: |
Final Evaluation- GR 11.doc |
Filesize: |
30.5 KB |
Downloaded: |
235 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Mon Jan 07, 2008 9:21 pm Post subject: RE:Tic Tac Toe Program |
|
|
You should play tic-tac-toe on paper enough times until you understand game mechanics well. Then talk through your thought process as you play. And finally formalize the logic into code.
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
rahman200012
|
Posted: Mon Jan 07, 2008 9:23 pm Post subject: Re: Tic Tac Toe Program |
|
|
Thanks for the reply. But I need pointers or something to guide me along. If I posted up code would that be of any benefit?
|
|
|
|
|
|
rahman200012
|
Posted: Mon Jan 07, 2008 9:31 pm Post subject: Re: Tic Tac Toe Program |
|
|
I am supposed to basically make a tic tac toe game w/ questions in which the user must answer correctly to answer for him/her to put an X or an O. How would I go about doing that?
|
|
|
|
|
|
Zampano
|
Posted: Mon Jan 07, 2008 9:34 pm Post subject: Re: Tic Tac Toe Program |
|
|
Think of what you need to do each time that a turn comes through.
Retrieve a random question from a source,
Make sure that number question never comes up again,
Have way for the person to choose a square if they answered correctly (but not one already chosen),
Check if there are three like symbols in a row and produce an analysis on the game (draw, x wins, etc.),
and then do it over again for the next turn with a counter keeping the number of turns.
Is there really anything more to it than that?
|
|
|
|
|
|
syntax_error
|
Posted: Mon Jan 07, 2008 9:58 pm Post subject: Re: Tic Tac Toe Program |
|
|
ahh what the heck to get you started :
use an array to rep the game broad
set the whole game broad to oo lets say -1
use simple numbers such as 1 for X and 0 as O
and i think that was a pretty good push as to getting the game started for you:roll:
|
|
|
|
|
|
|