Click to See Complete Forum and Search --> : Crossword Generator
kandieman101
Oct 18th, 2002, 02:51 PM
I want to make a crossword generator, where you input X words and it generates a working crossword for it.
I've searched the net with little luck, so if anyone has any algorithms/source code/suggestions/tips, please let me know! I'd really appreciate it!
Thanks in advance!
Kevin
Pirate
Oct 18th, 2002, 08:00 PM
I'm afraid I didn't get you .explain !
Sastraxi
Oct 18th, 2002, 09:10 PM
I'd say it would be an interesting challenge, not from a programming point of view, but from an algorithm one! I would follow logical steps, such as:
1. Generate array from wordlist
2. Sort through all letters, find the least used one that is more than 1. (2 and up)
3. If there are any letters with two, one must be horizontal, the other vertical, and they must touch.
4. Continue on through the list until you get to the most common ones. I suppose after this you could do a little routine that would check if any of them have exact placement on two (or more!) for example:....F..
....L.K
....A.E
....G.Y
....S..And you had LAKES, which would normally go here:....F..
....L.K
....A.E
....G.Y
LAKES..But, if you look at it, would be better going here:....F....
....LAKES
....A.E..
....G.Y..
....S....5. And other stuff! I dunno, you'd be best to thing of some things on your own so you know what you want to code! :)
GingerNut
Oct 19th, 2002, 04:30 AM
There's a crossword game here:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=5068&lngWId=1
Don't know if it's what you're after though.
When you say a crossword generator, do you mean that users can input their own words? If so, what do you do about the questions?
Sastraxi
Oct 19th, 2002, 07:24 AM
I suppose the users would input words and questions, and his gen. would create the layout!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.