| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 02/20/2006 13:06:55
|
WannaBe
Newbie
Joined: 02/20/2006 09:17:19
Messages: 11
Offline
|
I'm new to java; I'm in my second Java collegiate course, and have to say am barely treading water. I have a project to create tic tac toe without a gui. Can anyone point me in the right direction of where to get some leads. Thanks!
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 02/20/2006 13:37:53
|
tfecw
Newbie
Joined: 09/19/2005 15:02:20
Messages: 144
Location: No. VA.
Offline
|
Sure,
check out the tutorials at http://java.sun.com/docs/books/tutorial/index.html There are a ton of them. Let us know if you need any help along the way. Good luck
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 02/20/2006 14:12:45
|
WannaBe
Newbie
Joined: 02/20/2006 09:17:19
Messages: 11
Offline
|
This is my potential Tic Tac Program without GUI; written in pseudo/java. If anyone could assist me with this I would greatly appreciate it!
| Filename |
NJohnsonP5Main.java |
Download
|
| Description |
Here is my actual program in JGrasp |
| Filesize |
3 Kbytes
|
| Downloaded: |
791 time(s) |
This message was edited 4 times. Last update was at 02/20/2006 14:45:07
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 02/20/2006 14:19:18
|
destin
Newbie
Joined: 01/07/2006 19:13:04
Messages: 224
Offline
|
Looks good to me.
PS. Next time when posting make sure to use the [code][/code] tags. It makes it much easier to read. Thanks!
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 02/20/2006 14:30:31
|
WannaBe
Newbie
Joined: 02/20/2006 09:17:19
Messages: 11
Offline
|
Thanks Destin, but I was looking for some assitance in writing the actual code where I have pseudocode.
I've also submitted my .java in the previous message.
This message was edited 1 time. Last update was at 02/20/2006 14:31:01
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 02/20/2006 14:49:57
|
destin
Newbie
Joined: 01/07/2006 19:13:04
Messages: 224
Offline
|
Ah, sorry . Well, what have you tried?
First of all, you'll need a board.
I would recommend making final chars to represent what is in each sqaure.
Then, you need to initialize the board.
Then, to check the winner, this gets a bit tedious.
Hope this helps a little. Post back if you're still having trouble.
This message was edited 6 times. Last update was at 03/11/2006 07:16:33
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 02/20/2006 15:03:21
|
WannaBe
Newbie
Joined: 02/20/2006 09:17:19
Messages: 11
Offline
|
So, I'm adding another array for another board. Add this to the board I have already?
And also, I know this might seem extra tedious, but my professor is anal, and he wants us to use his methods, so is there anyway you could alter the win method into my already won method?
I can't have a gui as well. He wants to see a old style tic tac toe bracket like
| |
----|----|----
----|----|----
| |
Thanks a bunch!
This message was edited 4 times. Last update was at 02/20/2006 15:11:41
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 02/20/2006 15:06:16
|
destin
Newbie
Joined: 01/07/2006 19:13:04
Messages: 224
Offline
|
WannaBe wrote:So, I'm adding another array for another board. Add this to the board I have already?
No, you only need one board. I'm just confused as to why you initialize your board with 5 by 5.
WannaBe wrote:
And also, I know this might seem extra tedious, but my professor is anal, and he wants us to use his methods, so is there anyway you could alter the win method into my already won method?
Why don't you give it a shot?
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 02/20/2006 15:11:00
|
WannaBe
Newbie
Joined: 02/20/2006 09:17:19
Messages: 11
Offline
|
I believe it has to do with a manual tic tac toe screen as opposed to GUI.
01234
-----
0 |
1 |
2 |
3 |
4 |
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 02/20/2006 15:13:58
|
destin
Newbie
Joined: 01/07/2006 19:13:04
Messages: 224
Offline
|
WannaBe wrote:I believe it has to do with a manual tic tac toe screen as opposed to GUI.
01234
-----
0 |
1 |
2 |
3 |
4 |
I understand that there's no GUI. I just pictured it like this:
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 02/20/2006 15:22:48
|
WannaBe
Newbie
Joined: 02/20/2006 09:17:19
Messages: 11
Offline
|
Would you know how to convert my public void play() method into actual java code?
This message was edited 1 time. Last update was at 02/20/2006 15:23:01
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 02/20/2006 15:30:08
|
destin
Newbie
Joined: 01/07/2006 19:13:04
Messages: 224
Offline
|
Again, try it first, then ask for help. No one will not do it for you; we will only point you in the right direction.
So try it, if you're having problems, tell us exactly what you're having trouble with, what you don't understand.
Good luck!
This message was edited 1 time. Last update was at 02/20/2006 15:30:30
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 06/30/2011 11:44:37
|
frozenmonkey
Newbie
Joined: 06/30/2011 11:39:50
Messages: 1
Offline
|
Found this for you, it might help. But i suggest you to try it on your own. Just take this a reference.
Source: http://www.mycoding.net/2011/06/tic-tac-toe-in-java/
|
C++ and Java for beginners: www.mycoding.net |
|
|
 |
|
|