This book was published in 1981, and appears to be written mainly for the TRS-80—most likely the Model I, as it references “Level II BASIC”, which was the upgraded BASIC on the Model I. There is also a rough guide on converting the programs to Apple BASIC and the Commodore PET. It was probably composed well before 1981, as the Model III had already come out in 1980, and the TRS-80/Apple/PET triumvirate ruled mostly from 1977 to 1980.
Some of the programs will be unusable on anything other than a Model I, as they use “POKE” statements to directly address specific portions of memory that do specific things on that computer. Most of them, however, are fairly straightforward (I almost wrote “basic”) puzzle/guessing games.
And by “challenging”, they mean “nearly impossible” because they involve a whole lot of guessing. I tried the Bombardier program and the General program. Bombardier is playable; although it almost certainly had a typo in it; on line 370 it sets the secondary target after an IF/THEN statement that won’t be reached until several times in, but it references that variable immediately.
General, however, unless I’m missing the point, involves guessing direction and distance: North, South, East, or West, and then a distance from 1 to 10, to where the enemy is. You send out troops, and if you guess right, and send out enough troops, you win the battle. If you guess wrong, you lose a lot of those troops. But with a 1 in 40 or a something less than 1 in 4 chance of guessing correctly (sometimes your spies tell you the distance number), the number of troops lost will always exceed the number of enemy troops captured and killed.
General, also, has a typo; on line 405 there is a variable E5, which is never set anywhere else in the program, but there is an E(5) set elsewhere which appears to be the number desired. It’s an odd typo because it’s unclear whether E5 or E(5) is wrong: there are E1, E2, and E3 variables, but no E4, and no E(1), E(2), E(3), or E(4).
This highlights one of the big problems with books like this back then, which is that there was pretty much no way to avoid typos in any program long enough to be worthwhile. Typesetting even today usually involves a typo every several pages and that’s fiction using relatively readable English. Typesetting BASIC code must have been hell.
Reflecting the times, under “Games for Self-Improvement” there is one for developing your ESP.
One of the interesting things is seeing how the author tried to make the code more readable; that’s difficult to do in the BASIC of the era, but he does sort of indent some code to group it together, by putting extra spaces between the line number and the code, and he also uses spaces to line up related variable assignments.
The book is definitely something I would have considered usable back in the day, however, as the games that aren’t playable are definitely starting points for something that is, and we fully expected to have to hack the code we typed in to customize it just for ourselves.
In that spirit, here are some notes on how Chipmunk BASIC differs from the code in this book (that was another problem with books like this, that every computer used a different BASIC). These should also apply to HotPaw BASIC on the iPhone/iPad.
1. RND(0) should be RND(1) on Chipmunk BASIC; it generates a random number from 0 to 1. 2. Chipmunk BASIC requires arrays to be DIMmed first. 3. Chipmunk BASIC requires string data in DATA statements to be quoted. 4. PRINTing a string followed by a semicolon in Chipmunk BASIC does not insert a trailing space, but PRINTing a number followed by a semicolon does.
And in general, of course, computers are a lot faster now. Back then, delays were handled with FOR/NEXT loops. FOR I=1 to 2500 took several seconds back then, it takes less than a second today. To get a similar effect, you’d probably have to multiply the latter number by about 200,000. In Chipmunk BASIC,
PRINT TIME$:FOR I=1 TO 500000000:NEXT:PRINT TIME$
shows about a two-second delay. Of course, nowadays most computer languages have a sleep or delay function, such as Chipmunk BASIC’s “fn sleep()”. These are likely to be the better option, as they won’t waste CPU time, which can be an issue on battery-operated devices such as modern phones and tablets.