Re: A89: Crossword puzzle
[Prev][Next][Index][Thread]
Re: A89: Crossword puzzle
>I am workin on a game that is a crossword puzzle. I have it all
>finished except I don't know how I can get the 89 to know if the words
>in the puzzle are correct.
>Does anyone have an idea on how to do this? Thanks.
> Ben
Unfortunatly the only way to do this would be to store a large dictionary
on the calc. The common Linux dictionary (/usr/dict/words) is over 200kb.
If you wanted you probably could include a smaller dictionary with the most
common words. The best algorithm I know of to search the dictionary for
the target word is a binary search. Select the middle word in the
dictionary, if the target word is alphabeticly after it, repeat with that
half of the dictionary. Otherwise repeat with the first half. If your
dictionary is n words long, the worst case would be lg(n) comparisons
before you find the word. Irregardless, I don't think you would be able to
get people to use a crossword program that took up more then half of the
total memory (including archive) on the calc.
--Nate
Follow-Ups:
References: