I have both that book and the red one ... I learned to program by first copying game code and then making my own. It would be years before I would understand how to make something like a competitive chess engine, but by that time my logic was quite well developed.
Yes, both yellow and red. I remember a few of us went to the community college computer lab and typed Horserace into an Apple II+ and spent the afternoon modifying it.
When we tried to save it we realized the computer hadn't been booted up to recognize the floppy drives so we lost all are mods.
We also had voice synthesizer software (record and upload your voice from cassette tape) and added phrases to Super Star Trek like "Computer ready" and "Torpedoes fired."
I have the red one in a box somewhere. It was my introduction to programming as well: when I was seven years old, my dad had me enter the code into ZBASIC running on our Tandy 1000.
I remember entering the "Bible Quiz" game, but transcribing something wrong, causing it to print the answers rather than the questions. I called it "Bible Jeopardy".