Say where the collision handler is armed, and what BYE's last two verbs do
A reader building chapter 17 from the text alone had to infer that COLLISION 2, BRICKHIT belongs in the setup block rather than the frame loop, and met SCNCLR and QUIT for the first time in the assembly step. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EwxGB6TdoVvZ11KQQME9cL
This commit is contained in:
@@ -861,6 +861,9 @@ Arm a handler:
|
||||
COLLISION 2, BRICKHIT
|
||||
```
|
||||
|
||||
That line goes in the setup block, once, before the frame loop starts — arming a handler is
|
||||
a standing instruction, not something a frame does.
|
||||
|
||||
`COLLISION 2` fires when a sprite overlaps one of those rectangles. The handler runs
|
||||
**between source lines**, exactly like a `GOSUB` the program did not write, and must end in
|
||||
`RETURN`.
|
||||
@@ -1251,6 +1254,10 @@ SLEEP 2
|
||||
QUIT
|
||||
```
|
||||
|
||||
`SCNCLR` clears the text screen and `QUIT` ends the interpreter; both are in
|
||||
[Chapter 11](11-verb-reference.md). Turning the sprites off first matters because a sprite
|
||||
is drawn over the text, and a final score behind four sprites is not a final score.
|
||||
|
||||
The high score is one comparison, called whenever the score changes:
|
||||
|
||||
```basic norun
|
||||
|
||||
Reference in New Issue
Block a user