Classic Computer Magazine Archive COMPUTE! ISSUE 19 / DECEMBER 1981 / PAGE 48


Henry Kong

The main routine is listed early between lines 80 and 90 for faster execution. These lines select the data randomly and break each word into individual letters. The sorting algorithm rearranges the letters in alphabetical order, providing an "unscramble."

With the main routine securely tucked in, we start the gaming section beginning with line 100. Lines 100 to 120 deal with the questions and responses. Both the number of new words and the total attempts are tallied by the counters Q and C. The counter V keeps score of the correct guesses. Two chances are given in this program before you are out.

The following lines deal with the continuation of the game and/or final result. The final touch is to add in DATA statements. This can be done anywhere, usually at the end of the program. 500 DATA "EAR", "TABLE", "KITCHEN", "MOTHER", "COMPUTER". Since line 80 multiplies the RND by 50, this program needs 50 DATA statements. This can be increased or decreased according to taste. If you have unusually long words such as "misunderstanding" etc. you will need to add:

11 DIM W$(25)

or a (Bad subscript) will interrupt your program.

As it is, the game UNSCRAMBLE works pretty well and provides an enduring challenge for the whole family. It allows you to choose the number of rounds, stop whenever you wish, and gives you a percentage score at the end of the game. The two chances that it allows help you to catch up on your score should you be unsuccessful in your first few attempts.

Adding the last few lines will keep the program running if you want another game (to better your score, perhaps?) or if another player wants to join in.