ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

299 lines
6.9 KiB

  1. 10 PRINT TAB(33);"FTBALL"
  2. 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
  3. 30 PRINT:PRINT
  4. 220 PRINT "THIS IS DARTMOUTH CHAMPIONSHIP FOOTBALL.":PRINT
  5. 230 PRINT "YOU WILL QUARTERBACK DARTMOUTH. CALL PLAYS AS FOLLOWS:"
  6. 240 PRINT "1= SIMPLE RUN; 2= TRICKY RUN; 3= SHORT PASS;"
  7. 250 PRINT "4= LONG PASS; 5= PUNT; 6= QUICK KICK; 7= PLACE KICK."
  8. 260 PRINT
  9. 270 PRINT "CHOOSE YOUR OPPONENT";
  10. 280 INPUT O$(1)
  11. 290 O$(0)="DARTMOUTH"
  12. 300 PRINT
  13. 310 LET S(0)=0: LET S(1)=0
  14. 320 REM
  15. 330 DIM L$(20)
  16. 340 FOR I=1 TO 20: READ L$(I): NEXT I
  17. 350 DATA "KICK","RECEIVE"," YARD ","RUN BACK FOR ","BALL ON "
  18. 360 DATA "YARD LINE"," SIMPLE RUN"," TRICKY RUN"," SHORT PASS"
  19. 370 DATA " LONG PASS","PUNT"," QUICK KICK "," PLACE KICK"," LOSS "
  20. 380 DATA " NO GAIN","GAIN "," TOUCHDOWN "," TOUCHBACK ","SAFETY***"
  21. 385 DATA "JUNK"
  22. 390 LET P=INT(RND(1)*2)
  23. 400 PRINT O$(P);" WON THE TOSS"
  24. 410 DEF FNF(X)=1-2*P
  25. 420 DEF FNG(Z)=P*(X1-X)+(1-P)*(X-X1)
  26. 430 IF P=0 THEN 470
  27. 440 PRINT O$(1);" ELECTS TO RECEIVE."
  28. 450 PRINT
  29. 460 GOTO 580
  30. 470 PRINT "DO YOU ELECT TO KICK OR RECEIVE";
  31. 480 INPUT A$
  32. 490 PRINT
  33. 500 FOR E=1 TO 2
  34. 510 IF A$=L$(E) THEN 550
  35. 520 NEXT E
  36. 530 PRINT "INCORRECT ANSWER. PLEASE TYPE 'KICK' OR 'RECIEVE'";
  37. 540 GOTO 480
  38. 550 IF E=2 THEN 580
  39. 560 LET P=1
  40. 580 LET X=40+(1-P)*20
  41. 590 LET Y=INT(200*(RND(1)-.5)^3+55)
  42. 600 PRINT Y;L$(3);" KICKOFF"
  43. 610 LET X=X-FNF(1)*Y
  44. 620 IF ABS(X-50)>=50 THEN 700
  45. 630 LET Y=INT(50*RND(1)^2)+(1-P)*INT(50*RND(1)^4)
  46. 640 LET X=X+FNF(1)*Y
  47. 650 IF ABS(X-50)>=50 THEN 655
  48. 651 PRINT Y;L$(3);" RUNBACK"
  49. 652 GOTO 720
  50. 655 PRINT L$(4);
  51. 660 GOTO 2600
  52. 700 PRINT "TOUCHBACK FOR ";O$(P);"."
  53. 710 LET X=20+P*60
  54. 720 REM FIRST DOWN
  55. 730 GOSUB 800
  56. 740 LET X1=X
  57. 750 LET D=1
  58. 760 PRINT:PRINT "FIRST DOWN ";O$(P);"***"
  59. 770 PRINT
  60. 780 PRINT
  61. 790 GOTO 860
  62. 800 REM PRINT POSITION
  63. 810 IF X>50 THEN 840
  64. 820 PRINT L$(5);O$(0);X;L$(6)
  65. 830 GOTO 850
  66. 840 PRINT L$(5);O$(1);100-X;L$(6)
  67. 850 RETURN
  68. 860 REM NEW PLAY
  69. 870 LET T=T+1
  70. 880 IF T=30 THEN 1060
  71. 890 IF T<50 THEN 940
  72. 900 IF RND(1)>.2 THEN 940
  73. 910 PRINT "END OF GAME ***"
  74. 920 PRINT "FINAL SCORE: ";O$(0);": ";S(0);" ";O$(1);": ";S(1)
  75. 930 STOP
  76. 940 IF P=1 THEN 1870
  77. 950 PRINT "NEXT PLAY";
  78. 960 INPUT Z
  79. 970 IF Z<>INT(Z) THEN 990
  80. 980 IF ABS(Z-4)<=3 THEN 1010
  81. 990 PRINT "ILLEGAL PLAY NUMBER, RETYPE";
  82. 1000 GOTO 960
  83. 1010 LET F=0
  84. 1020 PRINT L$(Z+6);". ";
  85. 1030 LET R=RND(1)*(.98+FNF(1)*.02)
  86. 1040 LET R1=RND(1)
  87. 1050 ON Z GOTO 1110,1150,1260,1480,1570,1570,1680
  88. 1060 REM JEAN'S SPECIAL
  89. 1070 IF RND(1)> 1/3 THEN 940
  90. 1080 PRINT "GAME DELAYED. DOG ON FIELD."
  91. 1090 PRINT
  92. 1100 GOTO 940
  93. 1110 REM SIMPLE RUN
  94. 1120 LET Y=INT(24*(R-.5)^3+3)
  95. 1130 IF RND(1)<.05 THEN 1180
  96. 1140 GOTO 2190
  97. 1150 REM TRICKY RUN
  98. 1160 LET Y=INT(20*R-5)
  99. 1170 IF RND(1)>.1 THEN 2190
  100. 1180 LET F=-1
  101. 1190 LET X3=X
  102. 1200 LET X=X+FNF(1)*Y
  103. 1210 IF ABS(X-50)>=50 THEN 1240
  104. 1220 PRINT "*** FUMBLE AFTER ";
  105. 1230 GOTO 2230
  106. 1240 PRINT "*** FUMBLE."
  107. 1250 GOTO 2450
  108. 1260 REM SHORT PASS
  109. 1270 LET Y=INT(60*(R1-.5)^3+10)
  110. 1280 IF R<.05 THEN 1330
  111. 1290 IF R<.15 THEN 1390
  112. 1300 IF R<.55 THEN 1420
  113. 1310 PRINT "COMPLETE. ";
  114. 1320 GOTO 2190
  115. 1330 IF D=4 THEN 1420
  116. 1340 PRINT "INTERCEPTED."
  117. 1350 LET F=-1
  118. 1360 LET X=X+FNF(1)*Y
  119. 1370 IF ABS(X-50)>=50 THEN 2450
  120. 1380 GOTO 2300
  121. 1390 PRINT "PASSER TACKLED. ";
  122. 1400 LET Y=-INT(10*R1)
  123. 1410 GOTO 2190
  124. 1420 LET Y=0
  125. 1430 IF RND(1)<.3 THEN 1460
  126. 1440 PRINT "INCOMPLETE. ";
  127. 1450 GOTO 2190
  128. 1460 PRINT "BATTED DOWN. ";
  129. 1470 GOTO 2190
  130. 1480 REM LONG PASS
  131. 1490 LET Y=INT(160*(R1-.5)^3+30)
  132. 1500 IF R<.1 THEN 1330
  133. 1510 IF R<.3 THEN 1540
  134. 1520 IF R<.75 THEN 1420
  135. 1530 GOTO 1310
  136. 1540 PRINT "PASSER TACKLED. ";
  137. 1550 LET Y=-INT(15*R1+3)
  138. 1560 GOTO 2190
  139. 1570 REM PUNT OR KICK
  140. 1580 LET Y=INT(100*(R-.5)^3+35)
  141. 1590 IF D=4 THEN 1610
  142. 1600 LET Y=INT(Y*1.3)
  143. 1610 PRINT Y;L$(3);" PUNT"
  144. 1620 IF ABS(X+Y*FNF(1)-50)>=50 THEN 1670
  145. 1630 IF D<4 THEN 1670
  146. 1640 LET Y1=INT(R1^2*20)
  147. 1650 PRINT Y1;L$(3);" RUN BACK"
  148. 1660 LET Y=Y-Y1
  149. 1670 GOTO 1350
  150. 1680 REM PLACE KICK
  151. 1690 LET Y=INT(100*(R-.5)^3+35)
  152. 1700 IF R1>.15 THEN 1740
  153. 1710 PRINT "KICK IS BLOCKED ***"
  154. 1720 LET X=X-5*FNF(1)
  155. 1730 LET P=1-P
  156. 1740 GOTO 720
  157. 1750 LET X=X+FNF(1)*Y
  158. 1760 IF ABS(X-50)>=60 THEN 1810
  159. 1770 PRINT "KICK IS SHORT."
  160. 1780 IF ABS(X-50)>=50 THEN 2710
  161. 1790 P=1-P
  162. 1800 GOTO 630
  163. 1810 IF R1>.5 THEN 1840
  164. 1820 PRINT "KICK IS OFF TO THE SIDE."
  165. 1830 GOTO 2710
  166. 1840 PRINT "FIELD GOAL ***"
  167. 1850 LET S(P)=S(P)+3
  168. 1860 GOTO 2640
  169. 1870 REM OPPONENT'S PLAY
  170. 1880 IF D>1 THEN 1940
  171. 1890 IF RND(1)>1/3 THEN 1920
  172. 1900 LET Z=3
  173. 1910 GOTO 1010
  174. 1920 LET Z=1
  175. 1930 GOTO 1010
  176. 1940 IF D=4 THEN 2090
  177. 1950 IF 10+X-X1<5 THEN 1890
  178. 1960 IF X<5 THEN 1890
  179. 1970 IF X<=10 THEN 2160
  180. 1980 IF X>X1 THEN 2020
  181. 1990 LET A=INT(2*RND(1))
  182. 2000 LET Z=2+A*2
  183. 2010 GOTO 1010
  184. 2020 IF D<3 THEN 1990
  185. 2030 IF X<45 THEN 1990
  186. 2040 IF RND(1)>1/4 THEN 2070
  187. 2050 LET Z=6
  188. 2060 GOTO 1010
  189. 2070 LET Z=4
  190. 2080 GOTO 1010
  191. 2090 IF X>30 THEN 2140
  192. 2100 IF 10+X-X1<3 THEN 1890
  193. 2110 IF X<3 THEN 1890
  194. 2120 LET Z=7
  195. 2130 GOTO 1010
  196. 2140 LET Z=5
  197. 2150 GOTO 1010
  198. 2160 LET A=INT(2*RND(1))
  199. 2170 LET Z=2+A
  200. 2180 GOTO 1010
  201. 2190 REM GAIN OR LOSS
  202. 2200 LET X3=X
  203. 2210 LET X=X+FNF(1)*Y
  204. 2220 IF ABS(X-50)>=50 THEN 2450
  205. 2230 IF Y=0 THEN 2250
  206. 2240 PRINT ABS(Y);L$(3);
  207. 2250 PRINT L$(15+SGN(Y))
  208. 2280 IF ABS(X3-50)>40 THEN 2300
  209. 2290 IF RND(1)<.1 THEN 2860
  210. 2300 GOSUB 800
  211. 2310 IF F=0 THEN 2340
  212. 2320 LET P=1-P
  213. 2330 GOTO 740
  214. 2340 IF FNG(1)>=10 THEN 740
  215. 2350 IF D=4 THEN 2320
  216. 2360 LET D=D+1
  217. 2370 PRINT "DOWN: ";D;" ";
  218. 2380 IF (X1-50)*FNF(1)<40 THEN 2410
  219. 2390 PRINT "GOAL TO GO"
  220. 2400 GOTO 2420
  221. 2410 PRINT "YARDS TO GO: ";10-FNG(1)
  222. 2420 PRINT
  223. 2430 PRINT
  224. 2440 GOTO 860
  225. 2450 REM BALL IN END-ZONE
  226. 2460 IF X>=100 THEN 2490
  227. 2470 LET E=0
  228. 2480 GOTO 2500
  229. 2490 LET E=1
  230. 2500 ON 1+E-F*2+P*4 GOTO 2510,2590,2760,2710,2590,2510,2710,2760
  231. 2510 REM SAFETY
  232. 2520 LET S(1-P)=S(1-P)+2
  233. 2530 PRINT L$(19)
  234. 2540 GOSUB 2800
  235. 2550 PRINT O$(P);" KICKS OFF FROM ITS 20 YARD LINE."
  236. 2560 LET X=20+P*60
  237. 2570 LET P=1-P
  238. 2580 GOTO 590
  239. 2590 REM OFFENSIVE TD
  240. 2600 PRINT L$(17);"***"
  241. 2610 IF RND(1)>.8 THEN 2680
  242. 2620 LET S(P)=S(P)+7
  243. 2630 PRINT "KICK IS GOOD."
  244. 2640 GOSUB 2800
  245. 2650 PRINT O$(P);" KICKS OFF"
  246. 2660 LET P=1-P
  247. 2670 GOTO 580
  248. 2680 PRINT "KICK IS OFF TO THE SIDE"
  249. 2690 LET S(P)=S(P)+6
  250. 2700 GOTO 2640
  251. 2710 REM TOUCHBACK
  252. 2720 PRINT L$(18)
  253. 2730 LET P=1-P
  254. 2740 LET X=20+P*60
  255. 2750 GOTO 720
  256. 2760 REM DEFENSIVE TD
  257. 2770 PRINT L$(17);"FOR ";O$(1-P);"***"
  258. 2780 LET P=1-P
  259. 2790 GOTO 2600
  260. 2800 REM SCORE
  261. 2810 PRINT
  262. 2820 PRINT "SCORE: ";S(0);" TO ";S(1)
  263. 2830 PRINT
  264. 2840 PRINT
  265. 2850 RETURN
  266. 2860 REM PENALTY
  267. 2870 LET P3=INT(2*RND(1))
  268. 2880 PRINT O$(P3);" OFFSIDES -- PENALTY OF 5 YARDS."
  269. 2890 PRINT
  270. 2900 PRINT
  271. 2910 IF P3=0 THEN 2980
  272. 2920 PRINT "DO YOU ACCEPT THE PENALTY";
  273. 2930 INPUT A$
  274. 2940 IF A$="NO" THEN 2300
  275. 2950 IF A$="YES" THEN 3110
  276. 2960 PRINT "TYPE 'YES' OR 'NO'";
  277. 2970 GOTO 2930
  278. 2980 REM OPPONENT'S STRATEGY ON PENALTY
  279. 2990 IF P=1 THEN 3040
  280. 3000 IF Y<=0 THEN 3080
  281. 3010 IF F<0 THEN 3080
  282. 3020 IF FNG(1)<3*D-2 THEN 3080
  283. 3030 GOTO 3100
  284. 3040 IF Y<=5 THEN 3100
  285. 3050 IF F<0 THEN 3100
  286. 3060 IF D<4 THEN 3080
  287. 3070 IF FNG(1)<10 THEN 3100
  288. 3080 PRINT "PENALTY REFUSED."
  289. 3090 GOTO 2300
  290. 3100 PRINT "PENALTY ACCEPTED."
  291. 3110 LET F=0
  292. 3120 LET D=D-1
  293. 3130 IF P<>P3 THEN 3160
  294. 3140 LET X=X3-FNF(1)*5
  295. 3150 GOTO 2300
  296. 3160 LET X=X3+FNF(1)*5
  297. 3170 GOTO 2300
  298. 3180 END