DAVID WEES

Thoughts from a 21st century educator.

Reply to comment

Scrabble cheater

So I've created a script which takes some user input, and lets them search for all of the words in either the TWL06 or SOWPODS dictionary for words which match their input.

Some features:

1. The order that the user enters the letters doesn't matter.
2. The user can specify the exact location of some of the letters in the word
3. The user can use up to two wildcards in the letters (to represent blanks).

I'd like to try some ways to minimize the memory required to do this, it's possible that I need to read each line of the file at a time, and close the file after I've done so, so that I can search through a larger file (there are 2 other dictionaries I'd like to include, but they push PHP over the limit in terms of memory).

Check out my Scrabble cheater here.



Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
By submitting this form, you accept the Mollom privacy policy.

Twitter Follow me on Twitter

Subscribe Subcribe to my blog