Torpedo

Date: April 1983
Type: Program
Platform(s): TS 1000

Appears on

Cassette to accompany the April 1983 issue of Synchro-Sette.

Source Code

   1 CLS 
   2 LET C$=""
   3 LET HS=0
   5 LET A$=")\:                              \ .\.:\!!\. -"
  10 PRINT ,,"CURRENT PLAYER\ 'S NAME?"
  12 INPUT F$
  13 PRINT AT 1,0;F$;" IS NOW PLAYING.                "
  15 LET T=-1
  20 LET S=0
  30 PRINT AT 5,2;"   "
  35 LET T=T+1
  36 IF T>=20 THEN GOTO 500
  40 LET C=28
  50 GOSUB 100
  60 GOSUB 200
  90 GOTO 50
 100 LET C=C-RND
 110 IF C<2 THEN GOTO 30
 120 PRINT AT 5,C;A$
 130 PRINT AT 7,0;". . . . . . . . . . . . . . . ."
 160 RETURN 
 200 LET B$=INKEY$
 210 IF CODE B$<31 OR CODE B$>36 OR C$=B$ THEN RETURN 
 212 LET C$=B$
 215 LET T=T+1
 216 IF T>=20 THEN GOTO 500
 220 LET M=(TAN ((10*VAL B$)*2*PI/360))
 230 FOR X=1 TO 63 STEP 2
 240 IF M*X>43 THEN RETURN 
 250 PLOT X,M*X
 260 UNPLOT X,M*X
 270 GOSUB 300
 280 NEXT X
 290 RETURN 
 300 LET A=INT (INT (M*X)+.5)
 310 LET B=INT (INT (C*2)+.5)
 320 IF (A=32 OR A=33) AND (B>=X-2) AND (B<=X+1) THEN GOTO 400
 399 RETURN 
 400 FOR N=1 TO 10
 410 PRINT AT 5,C-1;"\@@\##\@@\##";AT 6,C-1;"\##\@@\##\@@";AT 5,C-1;"\!!\!!\!!\!!";AT 6,C-1;"\;;\;;\;;\;;";AT 5,C-1;"\;;\;;\;;\;;";AT 6,C-1;"\!!\!!\!!\!!";AT 5,C-1;"\~~\~~\~~\~~";AT 6,C-1;"\,,\,,\,,\,,";AT 5,C-1;"    ";AT 6,C-1;"    "
 420 NEXT N
 430 LET S=S+1
 440 FOR N=5 TO 21
 450 PRINT AT N,C-1;"\,,\;;\,,\,,";AT N-1,C-1;"    "
 460 NEXT N
 470 GOTO 30
 500 PRINT AT 21,0;S;" SUBS TORPEDOED - SCORE = ";INT (100*S/T)
 510 IF S<=HS THEN GOTO 540
 520 LET N$=F$
 530 LET HS=S
 540 PRINT AT 19,0;N$;" - HIGH SCORE - ";HS
 550 PAUSE 200
 560 CLS 
 600 GOTO 10
9998 SAVE "TORPED%O"
9999 GOTO 0

People

No people associated with this content.

Scroll to Top