Results 1 to 2 of 2
Thread: check a grid
- 06-02-2013, 08:05 PM #1Member
- Join Date
- Dec 2012
- Rep Power
check a grid
I'm making som kind of game, it looks like a crossword puzzel.
What is the best way to check every side of a square? I use swing to build up the grid.
It also depends on if you fill in a word from left to right or from top to bottom because you don't need to check the squares in the direction you are typing a word. For now I have conditions for every case, but that's about 500 lines, it doesn't work.
Instead of debugging it, there has to be an easier way. I think I need to look to John Conway's Game of Life.
What do you guys think?
- 06-03-2013, 03:46 PM #2
Re: check a grid
I'm not totally sure what your question is, but I think the answer is going to depend entirely on what kinds of data structures you're using to store the grid. A 2D array seems to make sense, but you haven't indicated your approach, so it's hard to comment further.
If you want better help, I suggest creating an SSCCE that demonstrates exactly what you're doing in as few lines as possible.
- By lolmister in forum Java 2DReplies: 1Last Post: 05-24-2012, 05:35 AM
- By java software in forum Java SoftwareReplies: 0Last Post: 03-27-2012, 07:00 PM
- By ranss41 in forum New To JavaReplies: 0Last Post: 01-06-2012, 05:41 PM
- By racewithferrari in forum New To JavaReplies: 2Last Post: 11-03-2009, 06:27 PM
- By racewithferrari in forum New To JavaReplies: 1Last Post: 11-01-2009, 11:16 PM