Publication: The Plotter
Pub Details: The Plotter v2 n3 (Volume 2, Issue 3)
Date: March 1984
Pages: 4-5
(REPRINTED FROM THE TIMEX SINCLAIR 2068)
This program draws a BOMB with a burning fuse along with a randomly chosen CHARACTER. To de-fuse the BOMB, you must enter the correct CODE number for that character. If you need more time at first, then increase the value of “t” in LINE 25.
You may also notice that the program makes use of the INKEY$ instead of INPUT. We have talked about the use of this before.
10 BORDER 6: PAPER 7: INK 2:CLS
20 PRINT AT 15,5;"BOMB"
20 CIRCLE 56,52,39
25 LET t=10
30 PLOT 56,91: DRAW 0,5: DRAW t,t: PLOT OVER 1;56+t,96+t
35 LET x=INT (RND*223)+33
40 IF x>=144 AND x<=164 THEN GO TO 35
45 PRINT AT 0,0:"WHAT IS THE CODE FOR:";CHR$ x
50 LET a$="": LET a=0
55 PAUSE 10: LET i$=INKEY$
60 GO SUB 500
65 IF t=0 THEN GO TO 950
70 IF i$=CHR$ 13 THEN GO TO 100
75 IF i$<"0" OR i$>"9" THEN GO TO 55
80 LET a$=a$+i$: LET a=VAL a$: PRINT AT 2,22;A$: GO TO 55
100 IF a=x THEN GO TO 900
105 PRINT AT 2,22; OVER 1:a$: GO TO 50
500 DRAW OVER 1;-1,-1
510 LET t=t-1: RETURN
900 PRINT AT 5 11; FLASH 1;"WELL DONE ": GO TO 1000
950 FOR k=1 TO 2: FOR j=0 TO 7: PAPER j: BORDER j:CLS:BEEP .01,k*7-j: NEXT j: NEXT k: BORDER 6
1000 PRINT "THE CODE FOR ";CHR$ x;" IS: ";x
1010 PRINT AT 21,0;"PRESS ""R"" TO RE-RUN"
1020 IF INKEY$="r" OR INKEY$="R" THEN RUN
1030 GO TO 1020
9000 SAVE "CHR TEST" LINE 0
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.