-
Crossword Generator
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
-
I'm afraid I didn't get you .explain !
-
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:
Code:
....F..
....L.K
....A.E
....G.Y
....S..
And you had LAKES, which would normally go here:
Code:
....F..
....L.K
....A.E
....G.Y
LAKES..
But, if you look at it, would be better going here:
Code:
....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! :)
-
There's a crossword game here:
http://www.planet-source-code.com/vb...=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?
-
I suppose the users would input words and questions, and his gen. would create the layout!