For a side project, I have to make a function search through a list of all words (80k or more).

I have an array of letters arranged like this:
abcd
efgh
ijkl
mnop

The user can go from "a" to its neighbours "b" "e" or "f". Crossing is allowed (eg. "b" to "e" to "a" and to "f").

My logic: Get all possible combinations of 3+ letters up to 16, then match every combination to the word list and remove anything that isnt a word, then sort by length.

But I dont even know where to begin! frown

I could hard-code all possible moves between letters, but that would be a LOT of combinations and time.

Anyone have any ideas?


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201