Hi Charles,

I don't know how others would take a swing at this, but this is what I would do:

First, define your boundaries. You're making a crossword puzzle, so
that would be a matrix with a specified width and height. Next up
you'll want to add words. Grab your nearest dictionairy and pounce in
those characters. It might be best to store those in a library-class
of some sort. Or perhaps an external txt- or xml-file. Then comes the
tricky part: write the algorithm.

I guess the following steps should be implemented in the algorithm:
1. choose a word
2. set some variable to 'horizontal' or 'vertical', perhaps even 'diagonal'
3. try fit the characters in some empty place in the matrix.
4. if it fits (maybe overlapping an alrady placed word), hurray!
   - if not, continue until you've tried all spaces, then dump it and
get another word.
5. goto 1

Now if you're not happy with the result, run the application a few
hundred times. Either that or you might want to add a little more
magic to the algorithm and shuffle/sort the words to spaces where the
overlap other words the most.

I hope this gives you some ideas.
Good luck!

Bart

2006/6/19, Charles Parcell <[EMAIL PROTECTED]>:
Can anyone point me to any links or give me some pointers on building a
programmatically built crossword puzzle board?  I don't mean just building
squares, but rather taking a word list and building intersecting words.

I have already build a word search game which is similar but there are some
additional rules which a cross word puzzle uses and is making it a much
harder task than original thought. For instance words can only be placed in
two directions rather than eight, In addition, words which are placed
horizontally or vertically next to one another must also make words in the
apposing direction.

So, any help would be greatly appreciated!

Charles P.
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to