Introducing the Word Search Creator

Introducing the Word Search Creator

By the end of this chapter, you will be able to create a fun program that generates word search puzzles. The user will enter a series of words into a list box, as shown in Figure 5.1.

Click To expand
Figure 5.1: The user enters a list of words, and a size for the finished puzzle.

The program then tries to generate a word search based on the user's word list. (It isn't always possible, but the program can usually generate a legal puzzle.) One possible solution for the word list shown in Figure 5.1 is demonstrated in Figure 5.2.

Click To expand
Figure 5.2: This puzzle contains all the words in the list.

If desired, the program can also generate an answer key based on the puzzle. This capability is shown in Figure 5.3.

Click To expand
Figure 5.3: Here's the answer key for the puzzle.

The secret to the word find game (and indeed most computer programs) is the way the data is handled. Once I had determined a good scheme for working with the data in the program, the actual programming wasn't too tough.