[Home] [Puzzles & Projects] [Delphi Techniques] [Math topics] [Library] [Utilities]
|
|
Problem DescriptionHere's an interesting puzzle requiring the player to choose one letter fro each row in a 5x5 letter grid from top to bottom to form five 5-letter words. Each letter will be used exactly once, and each letter position the a word must come from the corresponding row of the grid. Background & Techniques Non-programmers are welcome to read on, but may want to jump to bottom of this page to download the executable program now. Programmer's Notes:This is one of the more difficult recursive search based programs I've tackled because the search is mult-level. Not only must we find letters to build candidate words, but also find a sub-set of words that use all letters. After a week of work trying accomplish both tasks in a common "find" function I went back to the "divide and conquer" strategy by separating the two tasks.
Much easier - "Divide and Conquer" works again! The only other item worth mentioning is use of the library routine IgnoreSelectedDrawCell method in a OnDrawCell exit to remove the default highlighting of the currently selected cell. Running/Exploring the Program
Suggestions for Further Explorations
|
[Feedback] [Newsletters (subscribe/view)] [About me]Copyright © 2000-2018, Gary Darby All rights reserved. |