Results 1 to 2 of 2
Thread: help on my tictactoe program
- 05-24-2012, 01:21 AM #1
Member
- Join Date
- May 2012
- Posts
- 1
- Rep Power
- 0
help on my tictactoe program
Hi, I need help finishing my tictactoe program, I'm using netbeans. I set it up in a GUI and have it so that whenever a button is clicked, the text on it will turn into an "x" or an "o." But I cannot figure out how to make it so that when there are three in a row the program will recognize it and there will be a winner.
- 05-24-2012, 03:48 AM #2
Re: help on my tictactoe program
Without seeing any of your code you expect us to know what your problem is?
You can simply use brute force to check for a winner. Just see if the "value" in three consecutive squares are the same. Check rows, check columns check diagonals. You can do this in a method that returns true as soon as it finds three values that match.
Similar Threads
-
infamous tictactoe program...
By _inase in forum New To JavaReplies: 1Last Post: 09-12-2011, 01:53 PM -
I need help with my TicTacToe
By Nghasemi in forum New To JavaReplies: 2Last Post: 04-19-2011, 03:10 AM -
Help with TicTacToe
By jokerboy123 in forum New To JavaReplies: 1Last Post: 01-22-2011, 01:29 AM -
TicTacToe
By Thomas Covington in forum New To JavaReplies: 1Last Post: 04-10-2008, 04:51 AM -
TicTacToe
By Joe3161 in forum New To JavaReplies: 4Last Post: 11-25-2007, 06:47 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks