Publication: The Plotter
Pub Details: The Plotter v2 n2 (Volume 2, Issue 2)
Date: February 1984
Pages: 5-6
Here is a second short program for the B/W computer. It comes from ZX COMPUTING, and, like the others, is not too complicated but can teach new programmers a trick or two if you take the time to find out what each line does.
Move UP with the “1” key, move DOWN with the “A” key and use the “0” key to FIRE.
In line 25, the underlines mean that the characters are in the GRAPHICS mode: GRAPHICS Q, GRAPHICS W, 3 GRAPHICS SPACES, ETC. NOTE: THEY ARE SHIFTED GRAPHICS, NOT INVERSE CHARACTERS.
1 REM "DF"
10 LET A=5
11 LET N=1
15 LET B=0
20 LET S=0
25 LET A$="(gq'gw'3*sp'g8:3*sp'2*gw'2*sp'g6:2*sp:*)"
26 PRINT AT 11,0;"(12*g7)"
30 LET D=INT (RND*9)+1
35 LET C=12
40 IF A$(N+12)="*" THEN LET N=1
41 LET B$=INKEY$
45 PRINT AT A,B;">"
50 PRINT AT D,C;"(i=)"
55 PRINT AT 10,0;A$(N TO N+11)
60 IF B$="0" AND A=D THEN LET S=S+1
65 IF B$="0" AND A=D THEN PRINT AT D,C;"(gh)"
70 PRINT AT A,B;" "
75 IF B$="A" THEN LET A=A+1
80 IF B$="1" THEN LET A=A-1
85 PRINT AT D,C;" "
86 IF B$="0" AND A=D THEN GOTO 30
90 LET C=C-1
95 IF C=0 THEN GOTO 200
100 LET N=N+1
110 GOTO 40
200 PRINT AT 10,[illegible]SCORE=";S
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.