Question
Wordsearch Generator
Hi,
Just for fun (yeah I'm that bored) I thought I'd try and come up with a word search generator. And the more I think about it, the more complicated the idea gets - I initially thought it would be very simple.
I am just wondering if you guys had any idea on the best approach to make on a project like this?
I think the way it would work from a user perspective, is that they put the words into a form and CF generates a grid with the words placed in automatically...but placing thw words will be the biggest issue...some may overlap...and if they do, I need to make sure that the letters are the same and in the correct position.
I initially thought that I could break the strings apart to there seperate letters then insert them at a random point into an array (but only if that slot is empty first)...but the part it goes into and all subsequent spaces for the loength of the words also need to be blank.
After words were in it would be a simple case of looping the array out and filling any empty spaces with randomly generated letters which would be easy enough.
Hmmm, what do you thinkt he best approach would be? Have any ideas?
I thought it would make a good CF exercise for myself.
Also note that the word search doesn't need to be interactive...it just needs to display the generated output so that the user can then print it.
Cheers,
Mikey.
Just for fun (yeah I'm that bored) I thought I'd try and come up with a word search generator. And the more I think about it, the more complicated the idea gets - I initially thought it would be very simple.
I am just wondering if you guys had any idea on the best approach to make on a project like this?
I think the way it would work from a user perspective, is that they put the words into a form and CF generates a grid with the words placed in automatically...but placing thw words will be the biggest issue...some may overlap...and if they do, I need to make sure that the letters are the same and in the correct position.
I initially thought that I could break the strings apart to there seperate letters then insert them at a random point into an array (but only if that slot is empty first)...but the part it goes into and all subsequent spaces for the loength of the words also need to be blank.
After words were in it would be a simple case of looping the array out and filling any empty spaces with randomly generated letters which would be easy enough.
Hmmm, what do you thinkt he best approach would be? Have any ideas?
I thought it would make a good CF exercise for myself.
Also note that the word search doesn't need to be interactive...it just needs to display the generated output so that the user can then print it.
Cheers,
Mikey.
