![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
|
I am working on a crossword puzzle game. I have to read in a file with the clues, the answers and the direction (horizontal | vertical). I have no problem doing that.. What I am having a hard time with is generating the actuall crossword diagram. What would be the best way to generate the crossword board?
So far I am able to create the row columns for the user to select which word they are trying to solve 1 2 3 4 5
_ _ _ _ _
A |
B |
C |
D |
E | _ _ _ _ _ 1 2 3 4 5
_ _ _ _ _
A | t r u e
B | o
C | r
D |
_ _ _ _ _I know that first I have to find the longest words horizontally and vertically and that is how I can figure out the width and height of the board. Im looking forward to any ideas you guys have, oh and I am not allowed to use arrays...
__________________
JG-Webdesign |
|
|
|
|
|
#2 |
|
Sexy Programmer
|
This might be a little help to you. Java has System.out.printf() method. It works the same way as C and C++'s printf() function. You could align the chars perfectly with the 'Board'. I don't know the exact way to do it but I've done it before when I made a checkout program in C. I can not find the source code where I've done it so I can't really help you there.
![]() BTW, What the hell is up with your teacher and arrays? Does he/she really hate them that much?
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
|
|
#3 |
|
Professional Programmer
|
Aligning the characters isn't the problem.... I have a list of words which some should go horizontally and some should go vertically. I am not sure about how to figure out where the words cross each other and what their positions should be.
LOL, We haven't covered arrays in class yet.. thats why.
__________________
JG-Webdesign |
|
|
|
|
|
#4 | |
|
Caffeinated Neural Net
![]() Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,031
Rep Power: 5
![]() |
Quote:
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| generating character sequence | Gumby | Java | 12 | Jun 14th, 2006 7:46 AM |
| Making a crossword construction program using Turbo Pascal | RedMuse | Other Programming Languages | 1 | Feb 25th, 2006 8:53 AM |
| it's so easy it's hard puzzle | nnxion | Coder's Corner Lounge | 6 | Dec 20th, 2005 1:10 PM |
| Confused about a random # generating tutorial. | linuxpimp20 | C | 3 | Dec 1st, 2005 12:12 PM |
| problems with generating a random letter | conbrio | C | 26 | Jun 28th, 2005 11:09 AM |