Treasure Chase

Date: 198x
Type: Program
Platform(s): TS 1000

Appears on

Assembled by Tim Ward from many sources. Contains programs 10252 – 10293.

Gallery

Treasure Chase

Source Code

   1 LET C1=0
   2 REM TREASURE CHASE
   5 LET X=0
   6 LET Y=16
   7 LET Y1=Y
   8 LET X1=X
   9 LET A=INT (RND*22)
  10 LET B=INT (RND*32)
  12 LET C=0
  13 FAST 
  20 DIM H(22,32)
  26 FOR I=0 TO 21
  28 FOR J=0 TO 31
  30 PRINT AT I,J;"% "
  31 IF I=0 OR J=0 THEN GOTO 50
  32 IF NOT RND<.05 THEN GOTO 40
  34 LET H(I+1,J+1)=2
  36 PRINT AT I,J;"%*"
  40 IF NOT RND<.1 THEN GOTO 50
  42 LET H(I+1,J+1)=1
  44 PRINT AT I,J;"%."
  50 NEXT J
  60 NEXT I
  61 SLOW 
  65 PRINT AT X,Y;"%0"
  66 PRINT AT A,B;"%A"
  67 IF H(A+1,B+1)=2 THEN LET C=C+10
  68 IF H(A+1,B+1)=2 THEN LET H(A+1,B+1)=0
  69 IF H(A+1,B+1)=1 THEN LET C=C+1
  70 IF H(A+1,B+1)=1 THEN LET H(A+1,B+1)=0
  72 IF C>C1 THEN LET C1=C
  73 PRINT AT 0,0;"%Y%O%U%R";C;AT 0,9;"%H%I%G%H% %S%C%O%R%E";AT 0,21;C1
  80 PAUSE 9000
  81 IF A>X THEN LET X1=X+1
  82 IF A<X THEN LET X1=X-1
  83 IF B>Y THEN LET Y1=Y+1
  84 IF B<Y THEN LET Y1=Y-1
  85 PRINT AT X,Y;"% "
  86 LET X=X1
  87 LET Y=Y1
  88 IF X=A AND Y=B THEN GOTO 200
  89 IF NOT INKEY$="" THEN PRINT AT A,B;"% "
  95 IF INKEY$="0" THEN LET A=INT (RND*22)
  98 IF INKEY$="5" THEN LET B=B-1
 100 IF INKEY$="8" THEN LET B=B+1
 110 IF INKEY$="6" THEN LET A=A+1
 120 IF INKEY$="7" THEN LET A=A-1
 132 IF A>21 THEN LET A=21
 133 IF A<1 THEN LET A=1
 134 IF B>31 THEN LET B=31
 135 IF B<0 THEN LET B=0
 140 IF X=A AND Y=B THEN GOTO 200
 160 GOTO 65
 200 PRINT AT 10,10;"**GOT YOU**"
 202 PRINT AT A,B;"X"
 205 PRINT AT 20,2;"PLAY AGAIN ,INPUT Y OR N"
 207 INPUT G$
 208 IF G$="N" THEN STOP 
 210 GOTO 5
 220 CLEAR 
 230 SAVE "1029%1"
 240 RUN 

People

No people associated with this content.

Scroll to Top