10 Dim SCR$(10): Dim SCR(10)
20 On Error GoTo 60
30 OPEN "I",#1,"PJTL.DAT"
40 For I = 1 To 10: Input #1, SCR$(I), SCR(I): Next I
50 Close #1: GoTo 80
60 Resume 70
70 For I = 1 To 10: SCR$(I) = String$(10, 45): SCR(I) = 0: Next I
80 DEF FNAX(E) = 50 * Cos(3.1416 / 180 * ANG): K$ = "off": K = 1
90 DEF FNAY(E) = 50 * Sin(3.1416 / 180 * ANG)
100 Screen 1: Key OFF: Dim H(20): G = 9.8: CLS
110 PSet (6, 0): DRAW "F5D6L10U6E5"
120 PAINT(2,7):GET(0,0)-(11,12),H
130 Dim A%(3)
140 CIRCLE(12,1),1,2:PAINT(12,1),2
150 GET(11,0)-(13,3),A%
160 U = 70: GoSub 690: BOARD = 0: BAR = 0: SCORE = 0: Color 0
170 Line (100, 150)-(250, 199), 2, BF: Line (75, 190)-(150, 199), 2, BF
180 Line (250, 180)-(300, 199), 2, BF: Line (300, 150)-(319, 199), 2, BF
190 PANG=45:PUT(80,178),H:PUT(110,138),H
200 PUT(130,138),H:PUT(150,138),H:PUT(170,138),H
210 PUT(190,138),H:PUT(210,138),H:PUT(230,138),H
220 PUT(270,168),H:GOSUB 1800
230 M = 0: N = 0: ANG = PANG: Line (0, 191)-(FNAX(ANG), 191 - FNAY(ANG)), 1
240 Line (100, 199)-(U + 100, 199): A$ = INKEY$
250 A$ = INKEY$
260 If A$ = Chr$(27) Then GoTo 1630
270 If A$ = "+" And U < 130 Then U = U + 0.5: GoSub 380: GoTo 250
280 If A$ = "-" And U > 5 Then U = U - 0.5: GoSub 380: GoTo 250
290 If Len(A$) = 2 Then GoSub 310
300 GoTo 250
310 B$ = Right$(A$, 1)
320 If B$ = "K" And ANG <> 90 Then ANG = ANG + 1: GoTo 390
330 If B$ = "M" And ANG <> 0 Then ANG = ANG - 1: GoTo 390
340 If B$ = "H" And U < 130 Then U = U + 5: GoSub 380
350 If B$ = "P" And U > 5 Then U = U - 5: GoSub 380
360 IF B$="R" THEN VIEW(0,139)-(61,199):CLS:VIEW:LINE(0,199)-(319,199),0:RETURN 420
370 Return
380 Line (0, 199)-(319, 199), 0: Line (100, 199)-(U + 100, 199): Return
390 VIEW(0,139)-(61,199):CLS:VIEW(0,0)-(319,199):REM AX=50*COS(3.1416/180*ANG):AY=50*SIN(3.1416/180*ANG)
400 Line (0, 191)-(FNAX(ANG), 191 - FNAY(ANG)), 1
410 Return
420 PANG=ANG:ANG=(3.1416/180)*ANG:PUT(M,189-N),A%
430 SCORE = SCORE - 5: If SCORE < 0 Then SCORE = 0
440 GoSub 1800
450 For T = 0 To 2 * U * Sin(ANG) / G Step 0.1
460 X = (U * T * Cos(ANG))
470 Y = ((U * T * Sin(ANG)) - (0.5 * G * (T ^ 2)))
480 If X > 310 Or 180 - Y < 3 Then GoTo 550
490 If Point(X + 1, 190 - Y) = 3 Then GoTo 570
500 If K = 1 Then SOUND Y * 1.5 + 300, 1
510 PUT(M,189-N),A%
520 If Point(X + 1, 190 - Y) = 2 Then GoTo 230
530 PUT(X,189-Y),A%:M=X:N=Y
540 Next T
550 PUT(M,189-N),A%
560 GoTo 230
570 If BOARD = 1 Then GoTo 1220
580 If BOARD = 2 Then GoTo 1390
590 If BOARD = 3 Then GoTo 1550
600 IF X>260 THEN PUT(270,168),H:GOTO 660
610 For I = 220 To 100 Step -20
620 IF  X>I THEN PUT(I+10,138),H:GOTO 660
630 Next I
640 IF X>70 THEN PUT(80,178),H:GOTO 660
650 GoTo 230
660 GoSub 1740: BAR = BAR + 1
670 If BAR > 8 Then BOARD = 1: BAR = 0: GoTo 1150
680 GoTo 230
690 CLS: LOCATE 2, 10: Print "P R O J E C T I L E"
700 LOCATE 3, 10: Print "-------------------"
710 PSet (200, 30)
720 LOCATE 6, 20: Print "By - "
730 DRAW "e1r3e1r2e1r4e1r3e1r4e1r3e1r6u1r7bd3bl14g2d1g1d2g1d2g1d2g1d2g1d2g1d2g1d3g1d2"
740 DRAW "br7bu5e4u1e2d2g1d3r1e7u1e5nu1g4nr4d2g2d2l1d2r5"
750 DRAW "e2nr1u2e1r2d2nl1d1r2e2u1e1u1r1f2d3l1g1l1g1l1"
760 DRAW "br15e1u1e1u1e1u1e1u1e1u2e1u1e1u2e1u1e1u1e1u3e5R3D4G1L1G3L1G3D1G1D1G1D3F1D2F4R2U1R1U3G2L1H1U1E1U1R1U1R1U1R1F1D2"
770 DRAW "BD3R2E1R1U1R1U1E1U1R1U1E1U1E1U1E1U1E2U1E1U2BD13BL5D2G1D2F1R3"
780 DRAW "E1U1NR1G1L1U2E1R1U1R3D2NL1D1F2R4"
790 DRAW "BL68BU10E1"
800 Line (0, 50)-(319, 199), 3, B
810 VIEW(1,51)-(318,198)
820 CLS: LOCATE 12, 15: Print Chr$(201); "nstructions "
830 LOCATE 14, 15: Print "onditions"
840 LOCATE 16, 15: Print "lay"
850 LOCATE 20, 15: Print "uit"
860 LOCATE 18, 15: Print "core"
870 A$ = INKEY$
880 If A$ = "c" Or A$ = "C" Then GoTo 960
890 If A$ = "p" Or A$ = "P" Or A$ = Chr$(27) Then GoTo 940
900 If A$ = "i" Or A$ = "I" Then GoTo 1820
910 IF A$="q" OR A$="Q" THEN SCREEN 0,0,0:WIDTH 80:KEY ON:END
920 If A$ = "s" Or A$ = "S" Then GoTo 1990
930 GoTo 870
940 VIEW:CLS:LOCATE 10,10:INPUT "Name please";NAM$:NAM$=RIGHT$(NAM$,10)
950 CLS: Return
960 CLS
970 LOCATE 10, 3: Print "********* Play settings *********"
980 LOCATE 14, 10: Print Chr$(197); "arth"
990 LOCATE 16, 10: Print Chr$(205); "oon"
1000 LOCATE 18, 10: Print Chr$(213); "nknown world"
1010 LOCATE 20, 10: Print Chr$(212); "urn "; K$; " sound"
1020 LOCATE 23, 15: Print "G = "; G; Spc(10)
1030 A$ = INKEY$
1040 If A$ = Chr$(27) Then GoTo 820
1050 If A$ = "E" Or A$ = "e" Then G = 9.8: GoTo 1020
1060 If A$ = "M" Or A$ = "m" Then G = 9.8 / 6: GoTo 1020
1070 If A$ = "u" Or A$ = "U" Then GoTo 1110
1080 If (A$ = "t" Or A$ = "T") And (K = 0) Then K$ = "off": K = 1: GoTo 1010
1090 If (A$ = "t" Or A$ = "T") Then K$ = "on ": K = 0: GoTo 1010
1100 GoTo 1030
1110 CLS: LOCATE 12, 5: Print "Input the value of accleration"
1120 LOCATE 13,5:PRINT "due to gravity (1-9) ":G$=INPUT$(1)
1130 If Val(G$) > 0 Then G = Val(G$): GoTo 960
1140 GoTo 1110
1150 Rem ************** BOARD 1  *************** PICTURE *********
1160 CLS: PSet (95, 199): DRAW "P2,0;U20R70D15R20U15R55D15R25U70L25U25R25U25L25U20R25U54"
1170 PAINT(97,198),2
1180 RESTORE 1770: For I = 1 To 9: READ Q, W
1190 PUT(Q,W),H
1200 Next I: GoSub 1800
1210 GoTo 230
1220 Rem  ************* BOARD 1 **************** SCORE ***********
1230 RESTORE 1770
1240 For I = 1 To 9
1250 READ Q, W
1260 IF X+1>Q AND 190-Y>W THEN PUT(Q,W),H:GOTO 1290
1270 Next I
1280 GoTo 230
1290 GoSub 1740
1300 BAR = BAR + 1
1310 If BAR > 8 Then BAR = 0: BOARD = 2: GoTo 1330
1320 GoTo 230
1330 Rem ************** BOARD 2 **************** PICTURE **********
1340 CLS: PSet (105, 199): DRAW "P2,0;U30R20U20R20D20R20U20R20D20R40U40R20U40R40U20L40U20R40D10R35"
1350 PAINT(107,197),2:RESTORE 1780:FOR I= 1 TO 11
1360 READ Q, W
1370 PUT(Q,W),H
1380 Next I: GoSub 1800: GoTo 230
1390 Rem  ************* BOARD 2 **************** SCORE ***********
1400 RESTORE 1780
1410 For I = 1 To 11
1420 READ Q, W
1430 IF X+1>=Q AND 190-Y>=W THEN PUT(Q,W),H:GOTO 1450
1440 Next I: GoTo 230
1450 GoSub 1740
1460 BAR = BAR + 1
1470 If BAR > 10 Then BAR = 0: BOARD = 3: GoTo 1490
1480 GoTo 230
1490 Rem ************** BOARD 3 **************** PICTURE **********
1500 CLS: PSet (100, 199): DRAW "p2,0;u15r20d5r40u19l20u5r40d19r20d10r80u15r20u15l20u10r20u10r14u15l45u15l10u5r20u15l10u5r20u20l50u10r20u15l60u15r40u29"
1510 PAINT(101,198),2
1520 RESTORE 1790
1530 For I = 1 To 18
1540 READ Q,W:PUT(Q,W),H:NEXT I:GOSUB 1800:GOTO 230
1550 Rem  ************* BOARD 3 **************** SCORE ***********
1560 RESTORE 1790
1570 For I = 1 To 18
1580 READ Q, W
1590 IF X+1>Q AND 190-Y>W THEN PUT(Q,W),H:GOTO 1610
1600 Next I: LKLGOTO 130
1610 GoSub 1740: BAR = BAR + 1
1620 If BAR > 17 Then GoTo 1630 Else GoTo 230
1630 Rem LKSF
1640 If SCR(10) < SCORE Then SCR$(10) = NAM$: SCR(10) = SCORE: GoTo 1660
1650 Max = 4: GoTo 160
1660 For I = 1 To 9: For J = I + 1 To 10
1670 If SCR(I) < SCR(J) Then TEMP = SCR(I): TEMP$ = SCR$(I): SCR(I) = SCR(J): SCR$(I) = SCR$(J): SCR(J) = TEMP: SCR$(J) = TEMP$
1680 Next J: Next I
1690 ON ERROR GOTO 1730:OPEN "O",#1,"PJTL.DAT"
1700 For I = 1 To 10
1710 Write #1, SCR$(I), SCR(I)
1720 Next I: Close #1: GoTo 160
1730 Resume 160
1740 PUT(M,189-N),A%:IF K=1 THEN PLAY"a60b60c60d60e60f60"
1750 SCORE = SCORE + 25: GoSub 1800
1760 Return
1770 Data 243, 182, 243, 87, 243, 42, 213, 167, 192, 167, 165, 182, 140, 167, 120, 167, 100, 167
1780 Data 269, 77, 269, 37, 249, 77, 249, 37, 229, 117, 209, 157, 189, 157, 169, 137, 149, 157, 129, 137, 109, 157
1790 Data 300, 132, 282, 167, 282, 142, 272, 77, 260, 182, 260, 97, 245, 182, 245, 47, 225, 182, 225, 17, 205, 182, 205, 17, 185, 172, 165, 153, 145, 177, 145, 153, 125, 177, 104, 172
1800 LOCATE 1, 1: Print "SCORE = "; SCORE: LOCATE 1, 15: Print "G = "; G: LOCATE 1, 25: Print " HIGH = "; HIGH
1810 Return
1820 CLS: LOCATE 9, 2
1830 Print "Your aim  is to  destroy  the  targets"
1840 LOCATE 10, 2: Print "placed   at   different    places   at"
1850 LOCATE 11, 2: Print "different heights, hitting  the target"
1860 LOCATE 12, 2: Print "would earn you  25  points.  At  every"
1870 LOCATE 13, 2: Print "trial your  score   is  reduced  by 5."
1880 LOCATE 14, 2: Print "There is a choice of the no. of boards"
1890 LOCATE 15, 2: Print "and the accleration  due  to  gravity."
1900 LOCATE 17, 2: Print String$(16, 35); " USE "; String$(17, 35)
1910 LOCATE 18, 2: Print " - to change angle "
1920 LOCATE 19, 2: Print " - to inc. or dec. velocity"
1930 LOCATE 20, 2: Print " - to make fine adj.in velocity"
1940 LOCATE 21, 2: Print " - during  play  to  quit the  game"
1950 LOCATE 22, 2: Print " - INS  to shoot."
1960 LINE(0,0)-(317,130),2,B:PAINT(300,135),2
1970 LOCATE 24, 12: Print "Press any key...";
1980 A$=INPUT$(1):GOTO 800
1990 CLS: For I = 1 To 10
2080 LOCATE I + 10, 10: Print SCR$(I): LOCATE I + 10, 25: Print SCR(I)
2090 Next I
2100 A$=INPUT$(1):GOTO 820

Copyright © Titas Raha
17 Uttarpalli Sodepur,
Kolkata - 700110