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
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
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
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
: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
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
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
,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
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
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
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
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
-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
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
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
>>
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
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
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
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
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
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
21 matches
Mail list logo