mirror of
https://github.com/rfivet/BCG101.git
synced 2024-12-18 16:16:32 -05:00
Add FOTBAL and SALVO.
This commit is contained in:
parent
8168f5a31a
commit
8012bf857a
185
dec/FOTBAL.BAS
Normal file
185
dec/FOTBAL.BAS
Normal file
@ -0,0 +1,185 @@
|
||||
1 REM PROGRAM WRITTEN BY RAYMOND W. MISEYKA
|
||||
2 REM SENIOR AT BUTLER SENIOR HIGH SCHOOL
|
||||
3 REM BUTLER, PENNSYLVANIA 16001
|
||||
4 REM DATE: 1/30/73
|
||||
5 REM COMPUTER SUPERVISION- MR. WILLIAM ELLIS
|
||||
6 REM COMPUTER TOPICS INSTRUCTION- MR. ALBERT STEWERT
|
||||
7 REM I WROTE THIS PROGRAM BECAUSE OF THE CHALLENGE
|
||||
8 REM INVOLVED IN OVERCOMING THE COMPLEXITIES OF SUCH A GAME
|
||||
9 REM
|
||||
10 REM
|
||||
100 RANDOMIZE
|
||||
120 DIM A(20),B(20),C(40),H(2),T(2),W(2),X(2),Y(2),Z(2)
|
||||
130 DIM M$(2),D(2)
|
||||
140 PRINT "RAMIS ENTERPRISES PRESENTS N.F.U. FOOTBALL(NO FORTRAN USED)"
|
||||
145 PRINT\PRINT
|
||||
150 PRINT "DO YOU WISH INSTRUCTIONS?";\INPUT A$
|
||||
160 IF A$="NO" THEN 290\IF A$<>"YES" THEN 150
|
||||
170 PRINT "THIS IS A GAME FOR 2 TEAMS IN WHICH EACH PLAYER MUST"
|
||||
180 PRINT "PREPARE A TAPE WITH A DATA STATEMENT(1770 FOR TEAM 1"
|
||||
190 PRINT "1780 FOR TEAM 2)IN WHICH EACH TEAM SCRAMBLES NOS. 1-20"
|
||||
195 PRINT "THESE NUMBERS ARE THEN ASSIGNED TO 20 GIVEN PLAYS."
|
||||
200 PRINT "A LIST OF NOS. AND THEIR PLAYS IS PROVIDED WITH"
|
||||
210 PRINT "BOTH TEAMS HAVING THE SAME PLAYS. THE MORE SIMILAR THE"
|
||||
220 PRINT "PLAYS THE LESS YARDAGE GAINED. SCORES ARE GIVEN"
|
||||
223 PRINT "WHENEVER SCORES ARE MADE. SCORES MAY ALSO BE OBTAINED"
|
||||
225 PRINT "BY INPUTING 99,99 FOR PLAY NOS. TO PUNT OR ATTEMPT A"
|
||||
227 PRINT "FIELDGOAL, INPUT 77,77 FOR PLAY NOS.. QUESTIONS WILL BE"
|
||||
230 PRINT "ASKED THEN. ON 4TH DOWN YOU WILL ALSO BE ASKED WHETHER"
|
||||
240 PRINT "YOU WANT TO PUNT OR ATTEMPT A FIELD GOAL. IF THE ANSWER"
|
||||
250 PRINT "TO BOTH QUESTIONS IS NO, IT WILL BE ASSUMED YOU WANT TO"
|
||||
260 PRINT "TRY AND GAIN YARDAGE. ANSWER ALL QUESTIONS YES OR NO."
|
||||
270 PRINT "GAME IS PLAYED UNTIL PLAYERS TERMINATE (CONTROL-C)."
|
||||
280 PRINT "PLEASE PREPARE A TAPE AND RUN."\STOP
|
||||
290 PRINT\PRINT "INPUT SCORE LIMIT ON GAME";\INPUT E
|
||||
300 FOR I=1 TO 40\READ N\IF I>20 THEN 350
|
||||
330 A(N)=I\GOTO 360
|
||||
350 B(N)=I-20
|
||||
360 C(I)=N\NEXT I
|
||||
380 L=0\T=1
|
||||
410 PRINT "TEAM"T"PLAY CHART"
|
||||
420 PRINT "NO. PLAY"\PRINT
|
||||
430 PRINT C(1+L);TAB(6);"PITCHOUT"
|
||||
440 PRINT C(2+L);TAB(6);"TRIPLE REVERSE"
|
||||
450 PRINT C(3+L);TAB(6);"DRAW"
|
||||
460 PRINT C(4+L);TAB(6);"QB SNEAK"
|
||||
470 PRINT C(5+L);TAB(6);"END AROUND"
|
||||
480 PRINT C(6+L);TAB(6);"DOUBLE REVERSE"
|
||||
490 PRINT C(7+L);TAB(6);"LEFT SWEEP"
|
||||
500 PRINT C(8+L);TAB(6);"RIGHT SWEEP"
|
||||
510 PRINT C(9+L);TAB(6);"OFF TACKLE"
|
||||
520 PRINT C(10+L);TAB(6);"WISHBONE OPTION"
|
||||
530 PRINT C(11+L);TAB(6);"FLARE PASS"
|
||||
540 PRINT C(12+L);TAB(6);"SCREEN PASS"
|
||||
550 PRINT C(13+L);TAB(6);"ROLL OUT OPTION"
|
||||
560 PRINT C(14+L);TAB(6);"RIGHT CURL"
|
||||
570 PRINT C(15+L);TAB(6);"LEFT CURL"
|
||||
580 PRINT C(16+L);TAB(6);"WISHBONE OPTION"
|
||||
590 PRINT C(17+L);TAB(6);"SIDELINE PASS"
|
||||
600 PRINT C(18+L);TAB(6);"HALF-BACK OPTION"
|
||||
610 PRINT C(19+L);TAB(6);"RAZZLE-DAZZLE"
|
||||
620 PRINT C(20+L);TAB(6);"BOMB!!!!!!!!"
|
||||
630 L=L+20\T=2
|
||||
640 PRINT\PRINT "TEAR OFF HERE -----------------------------------------
|
||||
------"
|
||||
660 FOR X=1 TO 11\PRINT\NEXT X
|
||||
670 FOR Z=1 TO 3000\NEXT Z
|
||||
680 IF L=20 THEN 410
|
||||
690 D(1)=0\D(2)=3\M$(1)="--->"\M$(2)="<---"
|
||||
700 H(1)=0\H(2)=0\T(1)=2\T(2)=1
|
||||
710 W(1)=-1\W(2)=1\X(1)=100\X(2)=0
|
||||
720 Y(1)=1\Y(2)=-1\Z(1)=0\Z(2)=100
|
||||
725 GOSUB 1910
|
||||
730 PRINT "TEAM 1 DEFENDS 0 YD. GOAL--TEAM 2 DEFENDS 100 YD. GOAL"
|
||||
740 T=INT(2*RND(O)+1)
|
||||
760 PRINT\PRINT "THE COIN IS FLIPPED"
|
||||
765 P=X(T)-Y(T)*40
|
||||
770 GOSUB 1860\PRINT\PRINT "TEAM"T"RECEIVES KICK-OFF"
|
||||
780 K=INT(26*RND(O)+40)
|
||||
790 P=P-Y(T)*K
|
||||
794 IF W(T)*P<Z(T)+10 THEN 810\PRINT\PRINT "BALL WENT OUT OF ENDZONE";
|
||||
795 PRINT "--AUTOMATIC TOUCHBACK--"\GOTO 870
|
||||
810 PRINT\PRINT "BALL WENT"K"YARDS, NOW ON "P\GOSUB 1900
|
||||
830 PRINT "TEAM"T"DO YOU WANT TO RUNBACK";\INPUT A$
|
||||
840 IF A$="YES" THEN 1430\IF A$<>"NO" THEN 830
|
||||
850 IF W(T)*P<Z(T) THEN 880
|
||||
870 P=Z(T)-W(T)*20
|
||||
880 D=1\S=P
|
||||
885 PRINT "=============================================================
|
||||
========="
|
||||
890 PRINT\PRINT "TEAM"T"DOWN"D"ON "P;
|
||||
893 IF D<>1 THEN 900
|
||||
895 IF Y(T)*(P+Y(T)*10)>=X(T) THEN 898
|
||||
897 C=4\GOTO 900
|
||||
898 C=8
|
||||
900 IF C=8 THEN 904
|
||||
901 PRINT TAB(27);10-(Y(T)*P-Y(T)*S);"YARDS TO 1ST DOWN"
|
||||
902 GOTO 910
|
||||
904 PRINT TAB(27);X(T)-Y(T)*P;"YARDS TO GO"
|
||||
910 GOSUB 1900\IF D=4 THEN 1180
|
||||
920 RANDOMIZE
|
||||
930 U=INT(3*RND(O)-1)\GOTO 940
|
||||
936 PRINT "ILLEGAL PLAY NUMBER, CHECK AND"
|
||||
940 PRINT "INPUT OFFENSIVE PLAY, DEFENSIVE PLAY";
|
||||
950 IF T=2 THEN 970
|
||||
960 INPUT P1,P2\GOTO 975
|
||||
970 INPUT P2,P1
|
||||
975 IF P1=77 THEN 1180
|
||||
980 IF P1>20 THEN 1800\IF P1<1 THEN 1800
|
||||
990 IF P2>20 THEN 1800\IF P2<1 THEN 1800
|
||||
995 P1=INT(P1)\P2=INT(P2)
|
||||
1000 Y=INT(ABS(A(P1)-B(P2))/19*((X(T)-Y(T)*P+25)*RND(O)-15))
|
||||
1005 PRINT\IF T=2 THEN 1015
|
||||
1010 IF A(P1)<11 THEN 1048\GOTO 1020
|
||||
1015 IF B(P2)<11 THEN 1048
|
||||
1020 IF U<>0 THEN 1035\PRINT "PASS INCOMPLETE TEAM"T
|
||||
1030 Y=0\GOTO 1050
|
||||
1035 G=RND(O)\IF G>.025 THEN 1040\IF Y>2 THEN 1045
|
||||
1040 PRINT "QUARTERBACK SCRAMBLED"\GOTO 1050
|
||||
1045 PRINT "PASS COMPLETED"\GOTO 1050
|
||||
1048 PRINT "THE BALL WAS RUN"
|
||||
1050 P=P-W(T)*Y
|
||||
1060 PRINT\PRINT "NET YARDS GAINED ON DOWN"D"ARE "Y
|
||||
1070 G=RND(O)\IF G>.025 THEN 1110
|
||||
1080 PRINT\PRINT "** LOSS OF POSSESSION FROM TEAM"T"TO TEAM"T(T)
|
||||
1100 GOSUB 1850\PRINT\T=T(T)\GOTO 830
|
||||
1110 IF Y(T)*P>=X(T) THEN 1320
|
||||
1120 IF W(T)*P>=Z(T) THEN 1230
|
||||
1130 IF Y(T)*P-Y(T)*S>=10 THEN 880
|
||||
1140 D=D+1\IF D<>5 THEN 885
|
||||
1160 PRINT\PRINT "CONVERSION UNSUCCESSFUL TEAM"T\T=T(T)
|
||||
1170 GOSUB 1850\GOTO 880
|
||||
1180 PRINT "DOES TEAM"T"WANT TO PUNT";\INPUT A$
|
||||
1185 IF A$="NO" THEN 1200\IF A$<>"YES" THEN 1180
|
||||
1190 PRINT\PRINT "TEAM"T"WILL PUNT"\G=RND(O)\IF G<.025 THEN 1080
|
||||
1195 GOSUB 1850\K=INT(25*RND(O)+35)\T=T(T)\GOTO 790
|
||||
1200 PRINT "DOES TEAM"T"WANT TO ATTEMPT A FIELD-GOAL";\INPUT A$
|
||||
1210 IF A$="YES" THEN 1640\IF A$<>"NO" THEN 1200\GOTO 920
|
||||
1230 PRINT\PRINT "SAFETY AGAINST TEAM"T"-------------------OH-OH"
|
||||
1240 H(T(T))=H(T(T))+2\GOSUB 1810
|
||||
1280 PRINT "TEAM"T"DO YOU WANT TO PUNT INSTEAD OF A KICKOFF";\INPUT A$
|
||||
1290 P=Z(T)-W(T)*20\IF A$="YES" THEN 1190
|
||||
1320 PRINT\PRINT "TOUCHDOWN BY TEAM"T"*********************YEA TEAM"
|
||||
1340 Q=7\G=RND(O)\IF G>.1 THEN 1380
|
||||
1360 Q=6\PRINT "EXTRA POINT NO GOOD"\GOTO 1390
|
||||
1380 PRINT "EXTRA POINT GOOD"
|
||||
1390 H(T)=H(T)+Q\GOSUB 1810
|
||||
1420 T=T(T)\GOTO 765
|
||||
1430 K=INT(9*RND(O)+1)
|
||||
1440 R=INT(((X(T)-Y(T)*P+25)*RND(O)-15)/K)
|
||||
1460 P=P-W(T)*R
|
||||
1480 PRINT\PRINT "RUNBACK TEAM"T;R"YARDS"
|
||||
1485 RANDOMIZE\G=RND(O)\IF G<.025 THEN 1080
|
||||
1490 IF Y(T)*P>=X(T) THEN 1320
|
||||
1500 IF W(T)*P>=Z(T) THEN 1230\GOTO 880
|
||||
1640 PRINT\PRINT "TEAM"T"WILL ATTEMPT A FIELDGOAL"
|
||||
1645 RANDOMIZE\G=RND(O)\IF G<.025 THEN 1080
|
||||
1650 F=INT(35*RND(O)+20)
|
||||
1660 PRINT\PRINT "KICK IS"F"YARDS LONG"
|
||||
1680 P=P-W(T)*F\RANDOMIZE\G=RND(O)
|
||||
1690 IF G<.35 THEN 1735
|
||||
1700 IF Y(T)*P<X(T) THEN 1740
|
||||
1710 PRINT "FIELDGOAL GOOD FOR TEAM"T"*****************YEA"
|
||||
1720 Q=3\GOTO 1390
|
||||
1735 PRINT"BALL WENT WIDE"
|
||||
1740 PRINT "FIELDGOAL UNSUCCESSFUL TEAM"T"-----------------TOO BAD"
|
||||
1742 GOSUB 1850\IF Y(T)*P<X(T)+10 THEN 1745\T=T(T)\GOTO 794
|
||||
1745 PRINT\PRINT "BALL NOW ON "P
|
||||
1750 T=T(T)\GOSUB 1900\GOTO 830
|
||||
1770 DATA 17,8,4,14,19,3,10,1,7,11,15,9,5,20,13,18,16,2,12,6
|
||||
1780 DATA 20,2,17,5,8,18,12,11,1,4,19,14,10,7,9,15,6,13,16,3
|
||||
1800 IF P1<>99 THEN 936
|
||||
1810 PRINT\PRINT "TEAM 1 SCORE IS"H(1)
|
||||
1820 PRINT "TEAM 2 SCORE IS"H(2)\PRINT
|
||||
1825 IF H(T)<E THEN 1830\PRINT "TEAM"T"WINS****************"\GOTO 2000
|
||||
1830 IF P1=99 THEN 940\RETURN
|
||||
1850 PRINT
|
||||
1860 PRINT "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
+++++"
|
||||
1870 RETURN
|
||||
1900 PRINT TAB(D(T)+5+P/2);M$(T)
|
||||
1910 PRINT "TEAM 1 [0 10 20 30 40 50 60 70 80 90 100
|
||||
] TEAM 2"
|
||||
1920 PRINT
|
||||
1930 RETURN
|
||||
2000 END
|
327
dec/SALVO.BAS
Normal file
327
dec/SALVO.BAS
Normal file
@ -0,0 +1,327 @@
|
||||
1000 REM *** SALVO BY LARRY SIEGEL
|
||||
1010 REM *** LAST REVISION 6/9/73
|
||||
1020 REM *** CHECKED OUT ON RSTS/E BY DAVE AHL, DIGITAL
|
||||
1030 REM ***
|
||||
1040DIMA(10,10),B(10,10),C(7),D(7),E(12),F(12),G(12),H(12),K(10,10)
|
||||
1050LETZ8=0
|
||||
1060FORW=1TO12
|
||||
1070LETE(W)=-1
|
||||
1080LETH(W)=-1
|
||||
1090NEXTW
|
||||
1100FORX=1TO10
|
||||
1110FORY=1TO10
|
||||
1120LETB(X,Y)=0
|
||||
1130NEXTY
|
||||
1140NEXTX
|
||||
1150FORX=1TO12
|
||||
1160LETF(X)=0
|
||||
1170LETG(X)=0
|
||||
1180NEXTX
|
||||
1190FORX=1TO10
|
||||
1200FORY=1TO10
|
||||
1210LETA(X,Y)=0
|
||||
1220NEXTY
|
||||
1230NEXTX
|
||||
1240FORK=4TO1STEP-1
|
||||
1250LETU6=0
|
||||
1260GOSUB2910
|
||||
1270DEFFNA(K)=(5-K)*3-2*INT(K/4)+SGN(K-1)-1
|
||||
1280DEFFNB(K)=K+INT(K/4)-SGN(K-1)
|
||||
1290IFV+V2+V*V2=0THEN1260
|
||||
1300IFY+V*FNB(K)>10THEN1260
|
||||
1310IFY+V*FNB(K)<1THEN1260
|
||||
1320IFX+V2*FNB(K)>10THEN1260
|
||||
1330IFX+V2*FNB(K)<1THEN1260
|
||||
1340LETU6=U6+1
|
||||
1350IFU6>25THEN1190
|
||||
1360FORZ=0TOFNB(K)
|
||||
1370LETF(Z+FNA(K))=X+V2*Z
|
||||
1380LETG(Z+FNA(K))=Y+V*Z
|
||||
1390NEXTZ
|
||||
1400LETU8=FNA(K)
|
||||
1410FORZ2=U8TOU8+FNB(K)
|
||||
1420FORZ3=1TOU8-1
|
||||
1430IFSQR((F(Z3)-F(Z2))^2+(G(Z3)-G(Z2))^2)<3.59THEN1260
|
||||
1440NEXTZ3
|
||||
1450NEXTZ2
|
||||
1460FORZ=0TOFNB(K)
|
||||
1470LETA(F(Z+U8),G(Z+U8))=.5+SGN(K-1)*(K-1.5)
|
||||
1480NEXTZ
|
||||
1490NEXTK
|
||||
1500PRINT"ENTER COORDINATES FOR..."
|
||||
1510PRINT"BATTLESHIP"
|
||||
1520FORX=1TO5
|
||||
1530INPUTY,Z
|
||||
1540LETB(Y,Z)=3
|
||||
1550NEXT X
|
||||
1560PRINT"CRUISER"
|
||||
1570FORX=1TO3
|
||||
1580INPUTY,Z
|
||||
1590LETB(Y,Z)=2
|
||||
1600NEXTX
|
||||
1610PRINT"DESTROYER<A>"
|
||||
1620FORX=1TO2
|
||||
1630INPUTY,Z
|
||||
1640LETB(Y,Z)=1
|
||||
1650NEXTX
|
||||
1660PRINT"DESTROYER<B>"
|
||||
1670FORX=1TO2
|
||||
1680INPUTY,Z
|
||||
1690LETB(Y,Z)=.5
|
||||
1700NEXTX
|
||||
1710PRINT"DO YOU WANT TO START";
|
||||
1720INPUTJ$
|
||||
1730IFJ$<>"WHERE ARE YOUR SHIPS?"THEN1890
|
||||
1740PRINT"BATTLESHIP"
|
||||
1750FORZ=1TO5
|
||||
1760PRINTF(Z);G(Z)
|
||||
1770NEXTZ
|
||||
1780PRINT"CRUISER"
|
||||
1790PRINTF(6);G(6)
|
||||
1800PRINTF(7);G(7)
|
||||
1810PRINTF(8);G(8)
|
||||
1820PRINT"DESTROYER<A>"
|
||||
1830PRINTF(9);G(9)
|
||||
1840PRINTF(10);G(10)
|
||||
1850PRINT"DESTROYER<B>"
|
||||
1860PRINTF(11);G(11)
|
||||
1870PRINTF(12);G(12)
|
||||
1880GOTO1710
|
||||
1890LETC=0
|
||||
1900PRINT"DO YOU WANT TO SEE MY SHOTS";
|
||||
1910INPUTK$
|
||||
1920PRINT
|
||||
1930IFJ$<>"YES"THEN2620
|
||||
1940REM**************START
|
||||
1950IFJ$<>"YES"THEN1990
|
||||
1960LETC=C+1
|
||||
1970PRINT
|
||||
1980PRINT"TURN"C
|
||||
1990LETA=0
|
||||
2000FORW=.5TO3STEP.5
|
||||
2010FORX=1TO10
|
||||
2020FORY=1TO10
|
||||
2030IFB(X,Y)=WTHEN2070
|
||||
2040NEXTY
|
||||
2050NEXTX
|
||||
2060GOTO2080
|
||||
2070LETA=A+INT(W+.5)
|
||||
2080NEXTW
|
||||
2090FORW=1TO7
|
||||
2100LETC(W)=0
|
||||
2110LETD(W)=0
|
||||
2120LETF(W)=0
|
||||
2130LETG(W)=0
|
||||
2140NEXTW
|
||||
2150LETP3=0
|
||||
2160FORX=1TO10
|
||||
2170FORY=1TO10
|
||||
2180IFA(X,Y)>10THEN2200
|
||||
2190LETP3=P3+1
|
||||
2200NEXTY
|
||||
2210NEXTX
|
||||
2220PRINT"YOU HAVE"A"SHOTS"
|
||||
2230IFP3>=ATHEN2260
|
||||
2240PRINT"THE NUMBER OF YOUR SHOTS EXCEEDS THE NUMBER OF BLANK SQUARES"
|
||||
2250GOTO2890
|
||||
2260IFA<>0THEN2290
|
||||
2270PRINT"I HAVE WON"
|
||||
2280STOP
|
||||
2290FORW=1TOA
|
||||
2300INPUTX,Y
|
||||
2310IFX<>INT(X)THEN2370
|
||||
2320IFX>10THEN2370
|
||||
2330IFX<1THEN2370
|
||||
2340IFY<>INT(Y)THEN2370
|
||||
2350IFY>10THEN2370
|
||||
2360IFY>=1THEN2390
|
||||
2370PRINT"ILLEGAL, ENTER AGAIN"
|
||||
2380GOTO2300
|
||||
2390IFA(X,Y)>10THEN2440
|
||||
2400LETC(W)=X
|
||||
2410LETD(W)=Y
|
||||
2420NEXTW
|
||||
2430GOTO2460
|
||||
2440PRINT"YOU SHOT THERE BEFORE ON TURN"A(X,Y)-10
|
||||
2450GOTO2300
|
||||
2460FORW=1TOA
|
||||
2470IFA(C(W),D(W))=3THEN2540
|
||||
2480IFA(C(W),D(W))=2THEN2560
|
||||
2490IFA(C(W),D(W))=1THEN2580
|
||||
2500IFA(C(W),D(W))=.5THEN2600
|
||||
2510LETA(C(W),D(W))=10+C
|
||||
2520NEXTW
|
||||
2530GOTO2620
|
||||
2540PRINT"YOU HIT MY BATTLESHIP"
|
||||
2550GOTO2510
|
||||
2560PRINT"YOU HIT MY CRUISER"
|
||||
2570GOTO2510
|
||||
2580PRINT"YOU HIT MY DESTROYER<A>"
|
||||
2590GOTO2510
|
||||
2600PRINT"YOU HIT MY DESTROYER<B>"
|
||||
2610GOTO2510
|
||||
2620LETA=0
|
||||
2630IFJ$="YES"THEN2670
|
||||
2640LETC=C+1
|
||||
2650PRINT
|
||||
2660PRINT"TURN"C
|
||||
2670LETA=0
|
||||
2680FORW=.5TO3.1STEP.5
|
||||
2690FORX=1TO10
|
||||
2700FORY=1TO10
|
||||
2710IFA(X,Y)=WTHEN2750
|
||||
2720NEXTY
|
||||
2730NEXTX
|
||||
2740GOTO2760
|
||||
2750LETA=A+INT(W+.5)
|
||||
2760NEXTW
|
||||
2770LETP3=0
|
||||
2780FORX=1TO10
|
||||
2790FORY=1TO10
|
||||
2800IFB(X,Y)>10THEN2820
|
||||
2810LETP3=P3+1
|
||||
2820NEXTY
|
||||
2830NEXTX
|
||||
2840PRINT"I HAVE"A"SHOTS"
|
||||
2850IFP3>ATHEN2880
|
||||
2860PRINT"THE NUMBER OF MY SHOTS EXCEEDS THE NUMBER OF BLANK SQUARES"
|
||||
2870GOTO2270
|
||||
2880IFA<>0THEN2960
|
||||
2890PRINT"YOU HAVE WON"
|
||||
2900STOP
|
||||
2910LETX=INT((RND(-1)*10)+1)
|
||||
2920LETY=INT((RND(-1)*10)+1)
|
||||
2930LETV=INT(3*RND(-1)-1)
|
||||
2940LETV2=INT(3*RND(-1)-1)
|
||||
2950RETURN
|
||||
2960FORW=1TO12
|
||||
2970IFH(W)>0THEN3800
|
||||
2980NEXTW
|
||||
2990REM**************RANDOM
|
||||
3000LETW=0
|
||||
3010LETR3=0
|
||||
3020GOSUB2910
|
||||
3030RESTORE
|
||||
3040LETR2=0
|
||||
3050LETR3=R3+1
|
||||
3060IFR3>100THEN3010
|
||||
3070IFX>10THEN3110
|
||||
3080IFX>0THEN3120
|
||||
3090LETX=1+INT(RND(-1)*2.5)
|
||||
3100GOTO3120
|
||||
3110LETX=10-INT(RND(-1)*2.5)
|
||||
3120IFY>10THEN3160
|
||||
3130IFY>0THEN3270
|
||||
3140LETY=1+INT(RND(-1)*2.5)
|
||||
3150GOTO3270
|
||||
3160LETY=10-INT(RND(-1)*2.5)
|
||||
3170GOTO3270
|
||||
3180LETF(W)=X
|
||||
3190LETG(W)=Y
|
||||
3200IFW=ATHEN3380
|
||||
3210IFR2=6THEN3030
|
||||
3220READX1,Y1
|
||||
3230LETR2=R2+1
|
||||
3240DATA1,1,-1,1,1,-3,1,1,0,2,-1,1
|
||||
3250LETX=X+X1
|
||||
3260LETY=Y+Y1
|
||||
3270IFX>10THEN3210
|
||||
3280IFX<1THEN3210
|
||||
3290IFY>10THEN3210
|
||||
3300IFY<1THEN3210
|
||||
3310IFB(X,Y)>10THEN3210
|
||||
3320FORQ9=1TOW
|
||||
3330IFF(Q9)<>XTHEN3350
|
||||
3340IFG(Q9)=YTHEN3210
|
||||
3350NEXTQ9
|
||||
3360LETW=W+1
|
||||
3370GOTO3180
|
||||
3380IFK$<>"YES"THEN3420
|
||||
3390FORZ5=1TOA
|
||||
3400PRINTF(Z5);G(Z5)
|
||||
3410NEXTZ5
|
||||
3420FORW=1TOA
|
||||
3430IFB(F(W),G(W))=3THEN3500
|
||||
3440IFB(F(W),G(W))=2THEN3520
|
||||
3450IFB(F(W),G(W))=1THEN3560
|
||||
3460IFB(F(W),G(W))=.5THEN3540
|
||||
3470LETB(F(W),G(W))=10+C
|
||||
3480NEXTW
|
||||
3490GOTO1950
|
||||
3500PRINT"I HIT YOUR BATTLESHIP"
|
||||
3510GOTO3570
|
||||
3520PRINT"I HIT YOUR CRUISER"
|
||||
3530GOTO3570
|
||||
3540PRINT"I HIT YOUR DESTROYER<B>"
|
||||
3550GOTO3570
|
||||
3560PRINT"I HIT YOUR DESTROYER<A>"
|
||||
3570FORQ=1TO12
|
||||
3580IFE(Q)<>-1THEN3730
|
||||
3590LETE(Q)=10+C
|
||||
3600LETH(Q)=B(F(W),G(W))
|
||||
3610LETM3=0
|
||||
3620FORM2=1TO12
|
||||
3630IFH(M2)<>H(Q)THEN3650
|
||||
3640M3=M3+1
|
||||
3650NEXTM2
|
||||
3660IFM3<>INT(H(Q)+.5)+1+INT(INT(H(Q)+.5)/3)THEN3470
|
||||
3670FORM2=1TO12
|
||||
3680IFH(M2)<>H(Q)THEN3710
|
||||
3690LETE(M2)=-1
|
||||
3700LETH(M2)=-1
|
||||
3710NEXTM2
|
||||
3720GOTO3470
|
||||
3730NEXTQ
|
||||
3740PRINT"PROGRAM ABORT:"
|
||||
3750FORQ=1TO12
|
||||
3760PRINT"E("Q") ="E(Q)
|
||||
3770PRINT"H("Q") ="H(Q)
|
||||
3780NEXTQ
|
||||
3790STOP
|
||||
3800REM***************USINGEARRAY
|
||||
3810FORR=1TO10
|
||||
3820FORS=1TO10
|
||||
3830LETK(R,S)=0
|
||||
3840NEXTS
|
||||
3850NEXTR
|
||||
3860FORU=1TO12
|
||||
3870IFE(U)<10THEN4020
|
||||
3880FORR=1TO10
|
||||
3890FORS=1TO10
|
||||
3900IFB(R,S)<10THEN3930
|
||||
3910LETK(R,S)=-1000000
|
||||
3920GOTO4000
|
||||
3930FORM=SGN(1-R)TOSGN(10-R)
|
||||
3940FORN=SGN(1-S)TOSGN(10-S)
|
||||
3950IFN+M+N*M=0THEN3980
|
||||
3960IFB(R+M,S+N)<>E(U)THEN3980
|
||||
3970LETK(R,S)=K(R,S)+E(U)-2*INT(H(U)+.5)
|
||||
3980NEXTN
|
||||
3990NEXTM
|
||||
4000NEXTS
|
||||
4010NEXTR
|
||||
4020NEXTU
|
||||
4030FORR=1TOA
|
||||
4040LETF(R)=R
|
||||
4050LETG(R)=R
|
||||
4060NEXTR
|
||||
4070FORR=1TO10
|
||||
4080FORS=1TO10
|
||||
4090LETQ9=1
|
||||
4100FORM=1TOA
|
||||
4110IFK(F(M),G(M))>=K(F(Q9),G(Q9))THEN4130
|
||||
4120LETQ9=M
|
||||
4130NEXTM
|
||||
4131 IF R>ATHEN4140
|
||||
4132 IF R=S THEN 4210
|
||||
4140IFK(R,S)<K(F(Q9),G(Q9))THEN4210
|
||||
4150FORM=1TOA
|
||||
4160IFF(M)<>RTHEN4190
|
||||
4170IFG(M)=STHEN4210
|
||||
4180NEXTM
|
||||
4190LETF(Q9)=R
|
||||
4200LETG(Q9)=S
|
||||
4210NEXTS
|
||||
4220NEXTR
|
||||
4230GOTO3380
|
||||
4240END
|
181
port/FOTBAL.BAS
Normal file
181
port/FOTBAL.BAS
Normal file
@ -0,0 +1,181 @@
|
||||
1 REM PROGRAM WRITTEN BY RAYMOND W. MISEYKA
|
||||
2 REM SENIOR AT BUTLER SENIOR HIGH SCHOOL
|
||||
3 REM BUTLER, PENNSYLVANIA 16001
|
||||
4 REM DATE: 1/30/73
|
||||
5 REM COMPUTER SUPERVISION- MR. WILLIAM ELLIS
|
||||
6 REM COMPUTER TOPICS INSTRUCTION- MR. ALBERT STEWERT
|
||||
7 REM I WROTE THIS PROGRAM BECAUSE OF THE CHALLENGE
|
||||
8 REM INVOLVED IN OVERCOMING THE COMPLEXITIES OF SUCH A GAME
|
||||
9 REM
|
||||
10 REM
|
||||
100 RANDOMIZE
|
||||
120 DIM A(20),B(20),C(40),H(2),T(2),W(2),X(2),Y(2),Z(2)
|
||||
130 DIM M$(2),D(2)
|
||||
140 PRINT "RAMIS ENTERPRISES PRESENTS N.F.U. FOOTBALL(NO FORTRAN USED)"
|
||||
145 PRINT\PRINT
|
||||
150 PRINT "DO YOU WISH INSTRUCTIONS?";\INPUT A$
|
||||
160 IF A$="NO" THEN 290\IF A$<>"YES" THEN 150
|
||||
170 PRINT "THIS IS A GAME FOR 2 TEAMS IN WHICH EACH PLAYER MUST"
|
||||
180 PRINT "PREPARE A TAPE WITH A DATA STATEMENT(1770 FOR TEAM 1"
|
||||
190 PRINT "1780 FOR TEAM 2)IN WHICH EACH TEAM SCRAMBLES NOS. 1-20"
|
||||
195 PRINT "THESE NUMBERS ARE THEN ASSIGNED TO 20 GIVEN PLAYS."
|
||||
200 PRINT "A LIST OF NOS. AND THEIR PLAYS IS PROVIDED WITH"
|
||||
210 PRINT "BOTH TEAMS HAVING THE SAME PLAYS. THE MORE SIMILAR THE"
|
||||
220 PRINT "PLAYS THE LESS YARDAGE GAINED. SCORES ARE GIVEN"
|
||||
223 PRINT "WHENEVER SCORES ARE MADE. SCORES MAY ALSO BE OBTAINED"
|
||||
225 PRINT "BY INPUTING 99,99 FOR PLAY NOS. TO PUNT OR ATTEMPT A"
|
||||
227 PRINT "FIELDGOAL, INPUT 77,77 FOR PLAY NOS.. QUESTIONS WILL BE"
|
||||
230 PRINT "ASKED THEN. ON 4TH DOWN YOU WILL ALSO BE ASKED WHETHER"
|
||||
240 PRINT "YOU WANT TO PUNT OR ATTEMPT A FIELD GOAL. IF THE ANSWER"
|
||||
250 PRINT "TO BOTH QUESTIONS IS NO, IT WILL BE ASSUMED YOU WANT TO"
|
||||
260 PRINT "TRY AND GAIN YARDAGE. ANSWER ALL QUESTIONS YES OR NO."
|
||||
270 PRINT "GAME IS PLAYED UNTIL PLAYERS TERMINATE (CONTROL-C)."
|
||||
280 PRINT "PLEASE PREPARE A TAPE AND RUN."\STOP
|
||||
290 PRINT\PRINT "INPUT SCORE LIMIT ON GAME";\INPUT E
|
||||
300 FOR I=1 TO 40\READ N\IF I>20 THEN 350
|
||||
330 A(N)=I\GOTO 360
|
||||
350 B(N)=I-20
|
||||
360 C(I)=N\NEXT I
|
||||
380 L=0\T=1
|
||||
410 PRINT "TEAM"T"PLAY CHART"
|
||||
420 PRINT "NO. PLAY"\PRINT
|
||||
430 PRINT C(1+L);TAB(6);"PITCHOUT"
|
||||
440 PRINT C(2+L);TAB(6);"TRIPLE REVERSE"
|
||||
450 PRINT C(3+L);TAB(6);"DRAW"
|
||||
460 PRINT C(4+L);TAB(6);"QB SNEAK"
|
||||
470 PRINT C(5+L);TAB(6);"END AROUND"
|
||||
480 PRINT C(6+L);TAB(6);"DOUBLE REVERSE"
|
||||
490 PRINT C(7+L);TAB(6);"LEFT SWEEP"
|
||||
500 PRINT C(8+L);TAB(6);"RIGHT SWEEP"
|
||||
510 PRINT C(9+L);TAB(6);"OFF TACKLE"
|
||||
520 PRINT C(10+L);TAB(6);"WISHBONE OPTION"
|
||||
530 PRINT C(11+L);TAB(6);"FLARE PASS"
|
||||
540 PRINT C(12+L);TAB(6);"SCREEN PASS"
|
||||
550 PRINT C(13+L);TAB(6);"ROLL OUT OPTION"
|
||||
560 PRINT C(14+L);TAB(6);"RIGHT CURL"
|
||||
570 PRINT C(15+L);TAB(6);"LEFT CURL"
|
||||
580 PRINT C(16+L);TAB(6);"WISHBONE OPTION"
|
||||
590 PRINT C(17+L);TAB(6);"SIDELINE PASS"
|
||||
600 PRINT C(18+L);TAB(6);"HALF-BACK OPTION"
|
||||
610 PRINT C(19+L);TAB(6);"RAZZLE-DAZZLE"
|
||||
620 PRINT C(20+L);TAB(6);"BOMB!!!!!!!!"
|
||||
630 L=L+20\T=2
|
||||
640 PRINT\PRINT "TEAR OFF HERE -----------------------------------------------"
|
||||
660 FOR X=1 TO 11\PRINT\NEXT X
|
||||
670 FOR Z=1 TO 3000\NEXT Z
|
||||
680 IF L=20 THEN 410
|
||||
690 D(1)=0\D(2)=3\M$(1)="--->"\M$(2)="<---"
|
||||
700 H(1)=0\H(2)=0\T(1)=2\T(2)=1
|
||||
710 W(1)=-1\W(2)=1\X(1)=100\X(2)=0
|
||||
720 Y(1)=1\Y(2)=-1\Z(1)=0\Z(2)=100
|
||||
725 GOSUB 1910
|
||||
730 PRINT "TEAM 1 DEFENDS 0 YD. GOAL--TEAM 2 DEFENDS 100 YD. GOAL"
|
||||
740 T=INT(2*RND(O)+1)
|
||||
760 PRINT\PRINT "THE COIN IS FLIPPED"
|
||||
765 P=X(T)-Y(T)*40
|
||||
770 GOSUB 1860\PRINT\PRINT "TEAM"T"RECEIVES KICK-OFF"
|
||||
780 K=INT(26*RND(O)+40)
|
||||
790 P=P-Y(T)*K
|
||||
794 IF W(T)*P<Z(T)+10 THEN 810\PRINT\PRINT "BALL WENT OUT OF ENDZONE";
|
||||
795 PRINT "--AUTOMATIC TOUCHBACK--"\GOTO 870
|
||||
810 PRINT\PRINT "BALL WENT"K"YARDS, NOW ON "P\GOSUB 1900
|
||||
830 PRINT "TEAM"T"DO YOU WANT TO RUNBACK";\INPUT A$
|
||||
840 IF A$="YES" THEN 1430\IF A$<>"NO" THEN 830
|
||||
850 IF W(T)*P<Z(T) THEN 880
|
||||
870 P=Z(T)-W(T)*20
|
||||
880 D=1\S=P
|
||||
885 PRINT "======================================================================"
|
||||
890 PRINT\PRINT "TEAM"T"DOWN"D"ON "P;
|
||||
893 IF D<>1 THEN 900
|
||||
895 IF Y(T)*(P+Y(T)*10)>=X(T) THEN 898
|
||||
897 C=4\GOTO 900
|
||||
898 C=8
|
||||
900 IF C=8 THEN 904
|
||||
901 PRINT TAB(27);10-(Y(T)*P-Y(T)*S);"YARDS TO 1ST DOWN"
|
||||
902 GOTO 910
|
||||
904 PRINT TAB(27);X(T)-Y(T)*P;"YARDS TO GO"
|
||||
910 GOSUB 1900\IF D=4 THEN 1180
|
||||
920 RANDOMIZE
|
||||
930 U=INT(3*RND(O)-1)\GOTO 940
|
||||
936 PRINT "ILLEGAL PLAY NUMBER, CHECK AND"
|
||||
940 PRINT "INPUT OFFENSIVE PLAY, DEFENSIVE PLAY";
|
||||
950 IF T=2 THEN 970
|
||||
960 INPUT P1,P2\GOTO 975
|
||||
970 INPUT P2,P1
|
||||
975 IF P1=77 THEN 1180
|
||||
980 IF P1>20 THEN 1800\IF P1<1 THEN 1800
|
||||
990 IF P2>20 THEN 1800\IF P2<1 THEN 1800
|
||||
995 P1=INT(P1)\P2=INT(P2)
|
||||
1000 Y=INT(ABS(A(P1)-B(P2))/19*((X(T)-Y(T)*P+25)*RND(O)-15))
|
||||
1005 PRINT\IF T=2 THEN 1015
|
||||
1010 IF A(P1)<11 THEN 1048\GOTO 1020
|
||||
1015 IF B(P2)<11 THEN 1048
|
||||
1020 IF U<>0 THEN 1035\PRINT "PASS INCOMPLETE TEAM"T
|
||||
1030 Y=0\GOTO 1050
|
||||
1035 G=RND(O)\IF G>.025 THEN 1040\IF Y>2 THEN 1045
|
||||
1040 PRINT "QUARTERBACK SCRAMBLED"\GOTO 1050
|
||||
1045 PRINT "PASS COMPLETED"\GOTO 1050
|
||||
1048 PRINT "THE BALL WAS RUN"
|
||||
1050 P=P-W(T)*Y
|
||||
1060 PRINT\PRINT "NET YARDS GAINED ON DOWN"D"ARE "Y
|
||||
1070 G=RND(O)\IF G>.025 THEN 1110
|
||||
1080 PRINT\PRINT "** LOSS OF POSSESSION FROM TEAM"T"TO TEAM"T(T)
|
||||
1100 GOSUB 1850\PRINT\T=T(T)\GOTO 830
|
||||
1110 IF Y(T)*P>=X(T) THEN 1320
|
||||
1120 IF W(T)*P>=Z(T) THEN 1230
|
||||
1130 IF Y(T)*P-Y(T)*S>=10 THEN 880
|
||||
1140 D=D+1\IF D<>5 THEN 885
|
||||
1160 PRINT\PRINT "CONVERSION UNSUCCESSFUL TEAM"T\T=T(T)
|
||||
1170 GOSUB 1850\GOTO 880
|
||||
1180 PRINT "DOES TEAM"T"WANT TO PUNT";\INPUT A$
|
||||
1185 IF A$="NO" THEN 1200\IF A$<>"YES" THEN 1180
|
||||
1190 PRINT\PRINT "TEAM"T"WILL PUNT"\G=RND(O)\IF G<.025 THEN 1080
|
||||
1195 GOSUB 1850\K=INT(25*RND(O)+35)\T=T(T)\GOTO 790
|
||||
1200 PRINT "DOES TEAM"T"WANT TO ATTEMPT A FIELD-GOAL";\INPUT A$
|
||||
1210 IF A$="YES" THEN 1640\IF A$<>"NO" THEN 1200\GOTO 920
|
||||
1230 PRINT\PRINT "SAFETY AGAINST TEAM"T"-------------------OH-OH"
|
||||
1240 H(T(T))=H(T(T))+2\GOSUB 1810
|
||||
1280 PRINT "TEAM"T"DO YOU WANT TO PUNT INSTEAD OF A KICKOFF";\INPUT A$
|
||||
1290 P=Z(T)-W(T)*20\IF A$="YES" THEN 1190
|
||||
1320 PRINT\PRINT "TOUCHDOWN BY TEAM"T"*********************YEA TEAM"
|
||||
1340 Q=7\G=RND(O)\IF G>.1 THEN 1380
|
||||
1360 Q=6\PRINT "EXTRA POINT NO GOOD"\GOTO 1390
|
||||
1380 PRINT "EXTRA POINT GOOD"
|
||||
1390 H(T)=H(T)+Q\GOSUB 1810
|
||||
1420 T=T(T)\GOTO 765
|
||||
1430 K=INT(9*RND(O)+1)
|
||||
1440 R=INT(((X(T)-Y(T)*P+25)*RND(O)-15)/K)
|
||||
1460 P=P-W(T)*R
|
||||
1480 PRINT\PRINT "RUNBACK TEAM"T;R"YARDS"
|
||||
1485 RANDOMIZE\G=RND(O)\IF G<.025 THEN 1080
|
||||
1490 IF Y(T)*P>=X(T) THEN 1320
|
||||
1500 IF W(T)*P>=Z(T) THEN 1230\GOTO 880
|
||||
1640 PRINT\PRINT "TEAM"T"WILL ATTEMPT A FIELDGOAL"
|
||||
1645 RANDOMIZE\G=RND(O)\IF G<.025 THEN 1080
|
||||
1650 F=INT(35*RND(O)+20)
|
||||
1660 PRINT\PRINT "KICK IS"F"YARDS LONG"
|
||||
1680 P=P-W(T)*F\RANDOMIZE\G=RND(O)
|
||||
1690 IF G<.35 THEN 1735
|
||||
1700 IF Y(T)*P<X(T) THEN 1740
|
||||
1710 PRINT "FIELDGOAL GOOD FOR TEAM"T"*****************YEA"
|
||||
1720 Q=3\GOTO 1390
|
||||
1735 PRINT"BALL WENT WIDE"
|
||||
1740 PRINT "FIELDGOAL UNSUCCESSFUL TEAM"T"-----------------TOO BAD"
|
||||
1742 GOSUB 1850\IF Y(T)*P<X(T)+10 THEN 1745\T=T(T)\GOTO 794
|
||||
1745 PRINT\PRINT "BALL NOW ON "P
|
||||
1750 T=T(T)\GOSUB 1900\GOTO 830
|
||||
1770 DATA 17,8,4,14,19,3,10,1,7,11,15,9,5,20,13,18,16,2,12,6
|
||||
1780 DATA 20,2,17,5,8,18,12,11,1,4,19,14,10,7,9,15,6,13,16,3
|
||||
1800 IF P1<>99 THEN 936
|
||||
1810 PRINT\PRINT "TEAM 1 SCORE IS"H(1)
|
||||
1820 PRINT "TEAM 2 SCORE IS"H(2)\PRINT
|
||||
1825 IF H(T)<E THEN 1830\PRINT "TEAM"T"WINS****************"\GOTO 2000
|
||||
1830 IF P1=99 THEN 940\RETURN
|
||||
1850 PRINT
|
||||
1860 PRINT "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
1870 RETURN
|
||||
1900 PRINT TAB(D(T)+5+P/2);M$(T)
|
||||
1910 PRINT "TEAM 1 [0 10 20 30 40 50 60 70 80 90 100] TEAM 2"
|
||||
1920 PRINT
|
||||
1930 RETURN
|
||||
2000 END
|
Loading…
Reference in New Issue
Block a user