Your Turn
Now the player plays. After the sequence, read their echo a key at a time with GET, light the panel they press, and check each one against the array. A right echo wins; a wrong press ends it with a harsh tone. This is the moment Bleeper becomes a game you can lose.
So far the machine performs and the player watches. Now flip it: after the sequence plays, it's
your turn to repeat it. You met GET in Reflex, catching one keypress instantly. Here it reads
the player's echo a key at a time — and each press is checked against the stored sequence.
10 POKE 53281,0
20 PRINT CHR$(147)
30 DIM PR(4),PC(4),PK(4),PF(4),S(20)
40 PR(1)=4:PC(1)=7:PK(1)=2:PF(1)=30
50 PR(2)=4:PC(2)=21:PK(2)=3:PF(2)=40
60 PR(3)=14:PC(3)=7:PK(3)=5:PF(3)=50
70 PR(4)=14:PC(4)=21:PK(4)=7:PF(4)=60
80 POKE 54296,15:POKE 54277,0:POKE 54278,240
90 FOR P=1 TO 4:GOSUB 1000:NEXT P
100 S(1)=1:S(2)=4:S(3)=2:NS=3
110 FOR I=1 TO NS:P=S(I):GOSUB 1100:FOR T=1 TO 100:NEXT T:NEXT I
120 PRINT CHR$(19);"YOUR TURN"
130 FOR I=1 TO NS
140 GET A$:IF A$="" THEN 140
150 P=VAL(A$):IF P<1 OR P>4 THEN 140
160 GOSUB 1100
170 IF P<>S(I) THEN 300
180 NEXT I
190 PRINT CHR$(19);"CORRECT! "
200 END
300 PRINT CHR$(19);"WRONG! "
310 POKE 54273,8:POKE 54272,0:POKE 54276,33
320 FOR T=1 TO 300:NEXT T:POKE 54276,32
330 END
1000 RP=PR(P):CP=PC(P)
1010 FOR Y=0 TO 7:FOR X=0 TO 11
1020 POKE 1024+(RP+Y)*40+CP+X,160
1030 POKE 55296+(RP+Y)*40+CP+X,PK(P)
1040 NEXT X:NEXT Y
1050 RETURN
1100 RP=PR(P):CP=PC(P)
1110 FOR Y=0 TO 7:FOR X=0 TO 11:POKE 55296+(RP+Y)*40+CP+X,1:NEXT X:NEXT Y
1120 POKE 54273,PF(P):POKE 54272,0:POKE 54276,17
1130 FOR T=1 TO 200:NEXT T
1140 POKE 54276,16
1150 FOR Y=0 TO 7:FOR X=0 TO 11:POKE 55296+(RP+Y)*40+CP+X,PK(P):NEXT X:NEXT Y
1160 RETURN
After the sequence plays (line 110), line 120 prints YOUR TURN and the echo loop begins. For
each step, line 140 — GET A$: IF A$="" THEN 140 — waits for a key, exactly the pattern from
Reflex. Line 150 turns the key into a panel number with VAL and checks it's 1 to 4. Then
GOSUB 1100 flashes that panel, so the player's press answers back on screen, just like the
machine's performance.
The check is line 170: IF P<>S(I) THEN 300. If the panel pressed doesn't match the one stored
at this step, the program jumps to the fail routine at line 300 — a harsh low tone and WRONG!.
Echo every step correctly and the loop finishes, printing CORRECT!. That single comparison —
the press against the array — is what makes Bleeper a game you can lose. The keys map by
position: 1 top-left, 2 top-right, 3 bottom-left, 4 bottom-right.
Try this
- Feel the fail. Repeat the sequence but deliberately press a wrong key on the last step —
the harsh tone and
WRONG!land the moment you slip. - Change the failure note. Line 310 sets the fail tone's pitch (
POKE 54273,8). Lower it to4for a deeper buzz, or raise it for a sharper one.
What's next
You can play one sequence and pass or fail it. In Unit 6 the rounds grow, a wrong press shows the length you reached, and a key starts a fresh game — the finished Bleeper.