Results 1 to 8 of 8
- 03-20-2009, 11:28 PM #1
Member
- Join Date
- Mar 2009
- Posts
- 3
- Rep Power
- 0
plz i need this program in 2 days .it`s tic tac toe game
Java Program that implements the TicTacToe game. The program should support the following interface:
class Player{
String name;
char symbol;
void setName (String pName)
String getName ()
void setSymbol (char symb)
char getSymbol (symb)
String toString()
}
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 true if the board has a wining situation and false otherwise. */
boolean isWinSituation ()
/* 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
-
You post your assignment and give us a due date? You've got to be farkin' kidding, right? This has to be a joke.plz i need this program in 2 days
- 03-21-2009, 12:01 AM #3
Member
- Join Date
- Mar 2009
- Posts
- 3
- Rep Power
- 0
hey
i`m really sry ..i have exam on it and i need it so much sry again
-
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, 12:14 AM #5
Member
- Join Date
- Mar 2009
- Posts
- 3
- Rep Power
- 0
no thx alot and sry again
-
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, 04:40 AM #7
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.
- 07-21-2009, 02:39 AM #8
Member
- Join Date
- Jul 2009
- Posts
- 8
- Rep Power
- 0
Similar Threads
-
Been stuck for days! any help would be appriciated...
By juddy1 in forum New To JavaReplies: 8Last Post: 01-06-2011, 06:33 PM -
Implementing "Game Over" in Minesweeper game based on Gridworld framework.
By JFlash in forum New To JavaReplies: 2Last Post: 08-05-2010, 04:49 AM -
Java Game Program
By software_dude_2009 in forum New To JavaReplies: 3Last Post: 02-22-2009, 04:31 PM -
I want to fetch last 7 days records in java
By rasikow in forum New To JavaReplies: 3Last Post: 12-05-2008, 12:34 PM -
No fo days between two dates
By Java Tip in forum Java TipReplies: 0Last Post: 01-28-2008, 09:06 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks