Description:
The code below is for a semi-automatic word search solver, that uses a recursive function to search a multi-dimension array containing the puzzle for the word that the user asks for.
The program is semi-autonomous, in that the search itself is carried out automatically, but the puzzle is (for the moment) hard-coded, and the user must enter each word that they want to search for one-by-one.
Interface:The interface is a simplistic text-based one, the user enters the word that they want to search for, and the program responds with a set of coordinates for the start and end positions of the word being searched for, or 'NO RESULT' if the word can't be found.
The only command available to the user apart from the search ability is the '#quit' command which exits the program.
Considerations: The program relies on the assumption that the dimensions of the grid to be searched are equivalent, i.e. rows == cols
Planned Improvements:
- The option for the user to enter in the puzzle data 'on the fly'
- Removal of the final global variable '@end'
- The ability for the user to define a list of values to search for
No comments:
Post a Comment