Re: [Flashcoders] Crossword generator advice

2009-06-02 Thread Karl DeSaulniers
You may want to also set something to read how many of those letters are in the word that match the letter your using in the one your placing. This may give you a few more options on placement. Karl On Jun 2, 2009, at 6:34 AM, Paul Andrews wrote: Off the top of my head.. For a horizontal

Re: [Flashcoders] Crossword generator advice

2009-06-02 Thread Paul Andrews
Off the top of my head.. For a horizontal overlap of a word, the new word can only be placed in a very few places - no further left than the leftmost position of the wordlaready placed and no further right than the new word can be placed without going off the grid, or not overlapping the right

RE: [Flashcoders] Crossword generator advice

2009-06-02 Thread Paul Steven
Behalf Of Paul Andrews Sent: 02 June 2009 11:54 To: Flash Coders List Subject: Re: [Flashcoders] Crossword generator advice Paul Steven wrote: > Here is a link to the crossword generator in its current state. > > http://www.mediakitchen.co.uk/crossword.html > > Cheers > > P

Re: [Flashcoders] Crossword generator advice

2009-06-02 Thread Paul Andrews
Sent: 02 June 2009 10:27 To: 'Flash Coders List' Subject: RE: [Flashcoders] Crossword generator advice Sorry to drag this one out but I have one last question. I implemented the recursive solution as Paul Andrews and Charles suggested however I find that it can take up to 8 minutes to

RE: [Flashcoders] Crossword generator advice

2009-06-02 Thread Paul Steven
:27 To: 'Flash Coders List' Subject: RE: [Flashcoders] Crossword generator advice Sorry to drag this one out but I have one last question. I implemented the recursive solution as Paul Andrews and Charles suggested however I find that it can take up to 8 minutes to generate a solut

RE: [Flashcoders] Crossword generator advice

2009-06-02 Thread Paul Steven
June 2009 11:14 To: Flash Coders List Subject: Re: [Flashcoders] Crossword generator advice You should use recursion. At each stage you should loop through the available words, trying to lay them onto the crossword area. Paul It goes a bit like this: var wordList = ["word1",&quo

RE: [Flashcoders] Crossword generator advice

2009-06-01 Thread Paul Steven
Thanks for all the new advice. Yes I figured a recursive solution was required and even though my code doesn't technically recurse, it more or less does the same thing. Anyway I have just figured out the problem with my code after painstakingly tracing variables for the last few days. I was not a

Re: [Flashcoders] Crossword generator advice

2009-06-01 Thread Charles Parcell
,y > position after the last position used, or null if none left. > } > > Paul > > > > > > - Original Message - From: "Paul Andrews" > To: "Flash Coders List" > Sent: Monday, June 01, 2009 11:14 AM > Subject: Re: [Flashcoders] Cross

Re: [Flashcoders] Crossword generator advice

2009-06-01 Thread Paul Andrews
2009 11:14 AM Subject: Re: [Flashcoders] Crossword generator advice You should use recursion. At each stage you should loop through the available words, trying to lay them onto the crossword area. Paul It goes a bit like this: var wordList = ["word1","word2","wo

Re: [Flashcoders] Crossword generator advice

2009-06-01 Thread Paul Andrews
he next } // Couldn't layout any of the words - solution failed. return newSolution; // this will be failed } - Original Message - From: "Paul Steven" To: "'Flash Coders List'" Sent: Monday, June 01, 2009 10:33 AM Subject: RE: [Fla

RE: [Flashcoders] Crossword generator advice

2009-06-01 Thread Paul Steven
I am still struggling to find a solution to this crossword generator and could do with some advice on a possible solution I want to try. If I enter my list of 16 words in a particular order (an order based on what looks like the order the solution would place them), the generator creates the puzzl

RE: [Flashcoders] Crossword generator advice

2009-05-31 Thread Paul Steven
Bit of a breakthrough - if I order the words in my initial list in the order that the words appear in the crossword solution, my algorithm finds the solution. Unfortunately though when in a different order, it doesn't work. ___ Flashcoders mailing list

RE: [Flashcoders] Crossword generator advice

2009-05-31 Thread Paul Steven
-Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Charles Parcell Sent: 31 May 2009 15:19 To: Flash Coders List Subject: Re: [Flashcoders] Crossword generator advice Two suggestions. 1) Order your list of wor

RE: [Flashcoders] Crossword generator advice

2009-05-31 Thread Paul Steven
Paul -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews Sent: 31 May 2009 12:37 To: Flash Coders List Subject: Re: [Flashcoders] Crossword generator advice I suspect that the algorithm is wrong. For ex

Re: [Flashcoders] Crossword generator advice

2009-05-31 Thread Charles Parcell
internet.com> > To: "'Flash Coders List'" > Sent: Sunday, May 31, 2009 12:17 PM > > Subject: RE: [Flashcoders] Crossword generator advice > > > Thanks Paul >> >> My code should backtrack in the situation you mention. So for example if >>

Re: [Flashcoders] Crossword generator advice

2009-05-31 Thread Paul Andrews
ton of other things to do or I'd have a go myself. Paul - Original Message - From: "Paul Steven" To: "'Flash Coders List'" Sent: Sunday, May 31, 2009 12:17 PM Subject: RE: [Flashcoders] Crossword generator advice Thanks Paul My code should backtr

RE: [Flashcoders] Crossword generator advice

2009-05-31 Thread Paul Steven
oders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews Sent: 31 May 2009 12:07 To: Flash Coders List Subject: Re: [Flashcoders] Crossword generator advice There is a flaw in your logic. It may be that multiple words fit a given situation, a

Re: [Flashcoders] Crossword generator advice

2009-05-31 Thread Paul Andrews
ven" To: "'Flash Coders List'" Sent: Sunday, May 31, 2009 10:09 AM Subject: RE: [Flashcoders] Crossword generator advice Just to add more information to how I am currently trying to achieve this. I basically start with the first word in the list and place it in th

RE: [Flashcoders] Crossword generator advice

2009-05-31 Thread Paul Steven
oders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Steven Sent: 31 May 2009 10:10 To: 'Flash Coders List' Subject: RE: [Flashcoders] Crossword generator advice Just to add more information to how I am currently trying to achieve this. I basically start with the first word in the list and plac

RE: [Flashcoders] Crossword generator advice

2009-05-31 Thread Paul Steven
ash Coders List' Subject: [Flashcoders] Crossword generator advice I am creating a crossword generator where you can enter the size of the grid and a list of words but for the life of me cannot get it to generate a puzzle with all the words in my list. This list of words is from a crossword that I k

[Flashcoders] Crossword generator advice

2009-05-31 Thread Paul Steven
I am creating a crossword generator where you can enter the size of the grid and a list of words but for the life of me cannot get it to generate a puzzle with all the words in my list. This list of words is from a crossword that I know is possible. Now either my generator is not up to scratch or t