Some of you may be familiar with the game called "BOGGLE".
Basically the game will display jumbled letters like this:
asdf
wcrq
nwoa
erdf
Then you need to look for all the possible answer in the board.
However I'm trying to develop a MOBILE GAME.
So here is what I'm planning:
I will ask the player to look for a SINGLE word in the given jumbled letters.
Example: look for the word CROWN
in these letters:
asdf
wcrq
nwoa
erdf
Then I need to "trace" the answer CROWN
out of this jumbled letters
But I don't know how I should implement that.
My problems are:
- How will the letters jumbled by itself and then at the same time the game can maintain the right answer?
- Every time the player traces the right answer, the next "look for the word" will display, then a new set of jumbled letters must be present
- If the player trace a right answer, the next "look for the word" SHOULD appear IMMEDIATELY thus TIME must be observed.
- The system must detect weather the player trace the right answer or not.
NOTE:
The player can trace to any direction he wants as long he won't jump to a letter to get the "look for the word."
Can you suggest algorithm and method or data structure to implement this?
I'm looking for a solution using HTML5, JavaScript and CSS.
Sample image: