class TicTacTaeBoard{
char [][] board ;
Player plyr1;
Player plyr2;
Player winner ;
byte turn; // 1 for player 1 or 2 for player 2
byte round; // from 1 to 9

/* constructor */
TicTacTaeBoard (Player p1, Player p2)

/* shows the name of the player to play, his symbol and game round.
Prompts the player to Enter his movement (row and column numbers)
if the movement is correct it records the movement and update the turn and the round, else it asks the player to retry. */
void play()

/* returns a string representing the two player names, their symbols, the game round, the winner name (if there is a winner), and the board contents
*/
String toString()

}

Class TicTacTaeGame{
/* Runs the game as follows:
- Prompts the users to enter the two players names and symbols
- Instantiates an object for each of the two players and an object for the TicTacTaeBoard
- Invokes the play method of TicTacTaeBoard repetitively until the game ends (one of the players has won or game reached round 9) .
- Invokes the toString method to print the game result
*/
public static void main (String [] args)

}

and also 2 more conditions but in different classes:
1) Computer-to-computer game: Modify the program so it simulates automated games where the system defines two players and plays the game automatically. The system first chooses the first movement for each player randomly (use the Random API), then it continues playing following specific hard-coded rules.
2) Computer-to-player: Modify the program so it allows a player to play against the computer

thx alot

03-21-2009, 12:53 AM

Fubarable

Quote:

plz i need this program in 2 days

You post your assignment and give us a due date? You've got to be farkin' kidding, right? This has to be a joke.

03-21-2009, 01:01 AM

amr

hey

i`m really sry ..i have exam on it and i need it so much sry again

03-21-2009, 01:06 AM

Fubarable

So let me see if I have this correct. you have an exam on this, you don't know how to do it, and you're in effect asking someone else to do it for you so you can hand in their work as your own, correct? Have I left anything out?

03-21-2009, 01:14 AM

amr

no thx alot and sry again

03-21-2009, 01:18 AM

Fubarable

OK, first of all, no one is going to help you cheat. If you don't know the subject, then drop the course.

If on the other hand, you know some basics, have already put in some work on this project and are willing to put in a lot more, there are plenty of people here willing to help you. But you can't expect any help by just dumping your assignment and givng a due date. What you must do is show all that you've done for this assignment so far, and then ask specific questions regarding your work. Do this, and I guarantee you'll get plenty of help. Up to you.

03-24-2009, 05:40 AM

Xyle

Or at least offer some "farkin'" money for someone to do your work for you...

Geez, no respect these days!

Hehehehe, just kidding of course.

Your assignments due in 2 days and you dont have anything? At least check the internet search engines for java tic tac toe "tutorial".

I use search 50+ times a day to get info on functions, methods, structure, variable use, etc in the 4-5 hours a day I get to program in my hobby time. I will only ask for help when I cant figure out something and the internet search didnt give me any pointers.

A little bit of advice, if your not willing to put in some awesome amounts of keymashing, brain-smoking, tear-flowing hard time to get your own programming code to work, might want to look into doing something different.