Earthquake

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

Appears on

Assembled by Tim Ward from many sources. Contains programs 10294-10335.

Gallery

Earthquake

Source Code

  10 GOSUB 1000
  15 CLS 
  20 LET E=INT (RND*50)+10
  30 LET R=0
  40 LET S=0
  50 DIM A$(21,31)
  52 LET M=INT (RND*28)
  54 LET N=INT (RND*18)+2
  70 LET C=0
  80 LET R=R+1
  90 LET X=10
 100 LET Y=15
 112 PRINT AT 0,0;"% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % "
 120 PRINT AT X,Y;"+";AT 1,0;"% %S%C%O%R%E%=";S;"% % % % % % %T%I%M%E% %L%I%M%I%T%=";E;AT 1,29;"% % % % % "
 122 PRINT AT 2,0;"% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % "
 140 LET A$(N,M)=B$
 150 PRINT AT N,M;B$
 180 PRINT AT X,Y;" "
 190 LET F$=INKEY$
 200 IF A$(X,Y-1)<>"% " AND F$="5" AND Y>2 THEN LET Y=Y-1
 210 IF A$(X,Y+1)<>"% " AND F$="8" AND Y<39 THEN LET Y=Y+1
 220 IF A$(X+1,Y)<>"% " AND F$="6" AND X<20 THEN LET X=X+1
 230 IF A$(X-1,Y)<>"% " AND F$="7" AND X>2 THEN LET X=X-1
 240 IF N=X AND M=Y THEN LET S=S+100
 250 IF N=X AND M=Y THEN PRINT AT 21,0;"% %Y%O%U% %M%A%D%E% %I%T%      % %P%R%E%S%S% %A%N%Y% %K%E%Y% "
 252 IF N=X AND M=Y THEN PRINT AT 14,12;"% %H%O%O%R%A%Y% "
 255 IF N=X AND M=Y THEN PAUSE 4E4
 257 IF N=X AND M=Y THEN GOTO 15
 270 IF E<=0 THEN PRINT AT 21,0;"OUT OF TIME       %G%A%M%E% %O%V%E%R"
 271 IF E<=0 THEN PRINT AT 21,0;"%O%U%T% %O%F% %T%I%M%E       GAME OVER"
 272 IF E<=0 THEN GOTO 270
 285 LET E=E-1
 290 IF A$(X-1,Y)="% " AND A$(X+1,Y)="% " AND A$(X+1,Y)="% " AND A$(X,Y-1)="% " AND A$(X,Y+1)="% " THEN PRINT AT 21,0;"YOU ARE TRAPED      %G%A%M%E% %O%V%E%R"
 295 IF A$(X-1,Y)="% " AND A$(X+1,Y)="% " AND A$(X+1,Y)="% " AND A$(X,Y-1)="% " AND A$(X,Y+1)="% " THEN PRINT AT 21,0;"%Y%O%U% %A%R%E% %T%R%A%P%E%D      GAME OVER"
 296 IF A$(X-1,Y)="% " AND A$(X+1,Y)="% " AND A$(X+1,Y)="% " AND A$(X,Y-1)="% " AND A$(X,Y+1)="% " THEN GOTO 290
 300 IF F$="" THEN GOTO 120
 310 LET S=S+11
 320 LET R=INT (RND*4)+1
 330 GOSUB (R*10)+340
 340 GOTO 120
 350 LET A$(X-1,Y)="% "
 355 PRINT AT X-1,Y;"% "
 356 RETURN 
 360 LET A$(X+1,Y)="% "
 365 PRINT AT X+1,Y;"% "
 366 RETURN 
 370 LET A$(X,Y-1)="% "
 375 PRINT AT X,Y-1;"% "
 376 RETURN 
 380 LET A$(X,Y+1)="% "
 385 PRINT AT X,Y+1;"% "
 386 RETURN 
1000 LET B$="%E"
1005 PRINT AT 2,11;"%E%A%R%T%H%Q%U%A%K%E"
1010 PRINT AT 5,0;"YOUR TRAPED IN A PYRAMID DURING"
1015 PRINT 
1020 PRINT "AN EARTHQUAKE, YOU ARE THE ""+"""
1025 PRINT 
1030 PRINT "AND YOU MOVE BY USING THE ARROW"
1035 PRINT 
1040 PRINT "KEYS ""5,6,7,8"",YOUR AIM IS TO"
1045 PRINT 
1050 PRINT "GET TO THE EXIT ""%E"" BEFORE "
1055 PRINT 
1060 PRINT "YOUR TIME RUNS OUT OR TRAPED BY"
1065 PRINT 
1070 PRINT "THE FALLING BLOCKS. GOOD LUCK"
1075 PRINT 
1076 PRINT 
1077 PRINT 
1080 PRINT "PRESS ANY KEY TO START THE GAME"
1085 PAUSE 4E4
2000 RETURN 
2010 CLEAR 
2020 SAVE "1033%1"
2030 RUN 

People

No people associated with this content.

Scroll to Top