Pro Football Prognosticator

Beat the spread with your Apple

by DAVID COWLES and BILL MARQUARDT

II Computing Magazine
OCTOBER / NOVEMBER 1985
Works with DOS 3.3 and ProDOS

When the Miami Dolphins met the San Francisco 49’ers in the Superbowl last January, the “Vegas line” favored the Niners by three points. This “spread” meant that an even-money bettor on the Dolphins would still win unless Miami were beaten by four points or more. Would you have taken that action? On which side?

Football Prognosticator picked San Francisco by eleven points, and the real final score was 38-16 Niners. If you had had Prognosticator working for you, you might have won a bundle. Over the season last year, Prognosticator beat the spread 65 percent of the time, and did even better late in the season.

Dave Cowles wrote the original version of this program for the IBM PC. It has been tested during the 1984 NFL season and the 1985 USFL season. The version published here for Apple II computers is set up for the 1985 NFL season.

We don’t guarantee the future accuracy of Prognosticator, but it’s better than guessing. There are two basic ground rules to keep in mind when comparing our spread to the Las Vegas line: 1) Do not place any credence in the Prognosticator’s results until at least four weeks of data have been gathered. 2) Give yourself a “fudge factor” of, say, three points between the results of the program and the official line. In other words, if the program says Team A will beat Team B by 10 points but the line says Team A will beat Team B by only 6 points, go with Team A.

USING THE PROGRAM

It’s easy to use the program. ProDOS users can type in and run the program listing as is. DOS 3.3 users need to type in the program as listed and verify with TYPO II, and then make these changes: in lines 2310, 4010 and 4370, any occurence of PRINT D $;”FRE” should be changed to X +FRE(O).

Once you have a working copy on disk, SAVE it as the only program on its own disk. This will be your working disk. Use the remainder of the disk to store the many files that the program calls for. Store your master copy in a safe place and back up your working disk every week so that you won’t lose any weekly data files.

ITEM 1

Your daily newspaper carries all the data you need in the box scores. Make sure you get all the box scores; remember Monday nights and those games on special days.

RUN the program, select the M enu Item 1, and enter the data as prompted. You absolutely must have all the data the first week, but later in the season you have the option ofentering a team’s season averages when the real data is not available. Use this option only when necessary, or the validity of the statistics will suffer. Each week you need to know yards gained rushing and passing, points scored, yards given up rushing and passing, and points given up by each team for each week of the season. During the playoffs, use the “unavailable this week” option for eliminated teams.

ITEM 2

Once you have entered data and saved it to disk, you can access the other menu items. To predict the outcome of the following week’s games, select Item 2 from the Main M enu. Use the space bar to cycle through the team names until you find one of two teams in a particular game. Type “S” to select the team , then repeat the process for the opponent. The expected results will be displayed on the screen.

You can predict only 14 games at a time, so if you want to “what if;’ you must go through the process again. You can print out the results any time after at least one game has been predicted, but you must do it before you leave this section of the program. After the fifth week ofdata has been entered, you have the choice of using either the entire season’s averages or the averages of only the last four weeks. Use either or both, but the four-week moving average should be a bit more accurate late in the season, at least according to Dave.

ITEM 3

Item 3 allows you to call back data from any week already recorded, and to correct any bad data. The season totals will be adjusted automatically for you , but remember that the disk will spin for a long time if it is late in the season, because every week’s data is being re-added.

ITEM 4

Item 4 is similar to Item 3, except that no revision is possible directly. Both Items 3 and 4 allow a printed report to be made.

You may use this program for the USFL simply by changing Line #5220 to reflect the correct number of teams (an even number), and by putting the team names in the D ata statements at the end of the program. Team names are limited to twenty characters.

I believe the program is sufficiently error-protected and friendly so that you will encounter no problems. But one last disclaimer, please. This program is based on a statistics averaging method that has been successful, but there is no guarantee that it will work in any given contest.

David Cowles, afomu:r president efa computer users’group, is a programmerfor th,e IBM PC and Commodore machines.

Bill Marquardt works as an electronics technician for the US. Postal Service. His hobbies include personal computing, programming for the Atari and Apple and amateur radio work. II

Main Program Listing

10 REM * FOOTBALL PROGNOSTICATOR
20 REM * BY DAVID COWLES AND BILL MARQUARDT
30 REM * (C) 1985 ANTIC PUBLISHING INC.
40 REM * II COMPUTING VOL.1 NO.1
50 REM
60 GOSUB 5200
100 REM * MAIN MENU *
110 PRINT D$;"CLOSE": TEXT : HOME
120 PRINT LINE$;" CURRENT WEEK IS WEEK #";W: PRINT LINE$
130 IF W = 0 THEN PRINT " (NO WEEKLY DATA FILES WERE LOADED.)": PRINT
140 PRINT : PRINT "SELECT BY NUMBER:": PRINT : PRINT
150 PRINT " (1) ENTER DATA FOR WEEK #";W + 1: PRINT
160 PRINT " (2) PREDICT SCORES FOR WEEK #";W + 1: PRINT
170 PRINT " (3) REVIEW-PRINT-REVISE WEEKLY STATS": PRINT
180 PRINT " (4) REVIEW-PRINT SEASON STATS": PRINT
190 PRINT " (5) QUIT": PRINT
200 ONERR GOTO 100
210 PRINT LINE$: PRINT "YOUR SELECTION => ";: GET KY: PRINT
220 IF KY < 1 OR KY > 5 THEN 100
230 ON KY GOTO 300,800,1700,2200,2300
300 REM * WEEKLY DATA INPUT *
310 WK = W + 1: HOME : PRINT LINE$;
320 IF W > 0 THEN PRINT "DATA FILES EXIST FOR WEEK 1";: IF W > 1 THEN PRINT " TO WEEK ";W;: GOTO 340
330 IF W = 0 THEN PRINT " BEGINNING NEW SEASON";
340 PRINT : PRINT LINE$
350 PRINT : PRINT " ENTER STATS FOR WEEK #";WK;" (Y/N) ?";: GET K$: PRINT
360 IF K$ < > "Y" THEN 100
370 FOR I = 1 TO T
380 HOME : PRINT LINE$;" ENTERING STATS FOR WEEK #";WK: PRINT LINE$;
390 HTAB 9: INVERSE : PRINT TN$(I): PRINT
400 IF WK = 1 THEN NORMAL : GOTO 460
410 HTAB 9: PRINT "E";: NORMAL : PRINT "NTER STATISTICS": PRINT
420 HTAB 9: INVERSE : PRINT "U";: NORMAL : PRINT "NAVAILABLE THIS WEEK": PRINT
430 HTAB 9: GET K$: PRINT
440 IF K$ < > "E" AND K$ < > "U" THEN 380
450 IF K$ = "U" THEN GOSUB 4600: GOTO 600
460 PRINT "ENTER STATS FOR: ";
470 INVERSE : PRINT TN$(I): NORMAL : PRINT
480 ONERR GOTO 4900
490 INPUT "TOTAL YARDS GAINED RUSHING => ";RO(I)
500 INPUT "TOTAL YARDS GAINED PASSING => ";PO(I)
510 YO(I) = RO(I) + PO(I): REM TOTAL OFFENSIVE YARDS
520 INPUT "TOTAL POINTS SCORED => ";SO(I): PRINT
530 INPUT "TOTAL YARDS GIVEN UP RUSHING => ";RD(I)
540 INPUT "TOTAL YARDS GIVEN UP PASSING => ";PD(I)
550 YD(I) = RD(I) + PD(I): REM TOTAL YARDS GIVEN UP
560 INPUT "TOTAL POINTS GIVEN UP => ";SD(I): PRINT
570 PRINT LINE$
580 PRINT "IS THE ABOVE INFO CORRECT (Y/N) ?";: GET K$: PRINT
590 IF K$ < > "Y" GOTO 380
600 NEXT I
610 REM * CREATE WEEKLY DATA FILES *
620 HTAB 7: PRINT CHR$ (7);">> SAVING FILES TO DISK <<" 630 F1$ = "WEEKLY.DATA.":F2$ = STR$ (WK) 640 F$ = F1$ + F2$ 650 PRINT D$;"OPEN ";F$ 660 PRINT D$;"WRITE ";F$ 670 GOSUB 2700:W = WK 680 PRINT D$;"OPEN WEEK.NUMBER" 690 PRINT D$;"WRITE WEEK.NUMBER" 700 PRINT W: PRINT D$;"CLOSE" 710 F$ = "SEASON.TOTALS": GOSUB 3200: GOSUB 3000 720 FOR I = 1 TO T:MA(I) = 0:MB(I) = 0:MC(I) = 0:MD(I) = 0 730 ME(I) = 0:MF(I) = 0:MG(I) = 0:MH(I) = 0: NEXT 740 IF W > 4 THEN GOSUB 4000
750 GOTO 100
800 REM * PREDICT THE WINNERS *
810 HOME : PRINT LINE$;" PREDICTIONS FOR FOOTBALL WEEK #";W + 1: PRINT LINE$
820 GAME = 0: IF W < 5 GOTO 880 830 PRINT " (1) USE SEASON AVERAGES": PRINT 840 PRINT " (2) USE LAST 4 WEEKS AVERAGE": PRINT : PRINT LINE$: PRINT 850 PRINT "YOUR SELECTION => ";: GET K: PRINT
860 IF K < 1 OR K > 2 GOTO 800
870 HOME : IF K = 2 THEN MV = 1
880 IF W = 0 THEN PRINT : PRINT "I CANNOT PREDICT THE FIRST WEEK!": PRINT : GOSUB 2600: GOTO 100
890 C = 1: IF GAME = T / 2 THEN HTAB 5: VTAB 4: PRINT "I CAN ONLY PREDICT ";T / 2;" GAMES!": PRINT : GOTO 970
900 VTAB 1: HTAB 17: PRINT "GAME ";GAME + (GAME < (T / 2)) 910 VTAB 12: PRINT "TEAM 1" 920 VTAB 14: PRINT "TEAM 2" 930 FOR I = 1 TO T: HTAB 1: VTAB 4 940 HTAB 6: INVERSE : PRINT "SPACE";: NORMAL : PRINT " TO SCROLL THROUGH TEAMS": PRINT 950 HTAB 8: INVERSE : PRINT "S";: NORMAL 960 PRINT "ELECT THE ";: INVERSE : PRINT TN$(I): PRINT 970 IF GAME > 0 THEN HTAB 8: INVERSE : PRINT "P";: NORMAL : PRINT "RINT PREDICTIONS": PRINT
980 HTAB 8: INVERSE : PRINT "Q";: NORMAL : PRINT "UIT THIS SECTION"
990 HTAB 8: VTAB 12 + (C > 1) * 2: GET K$
1000 IF K$ = "Q" THEN 100
1010 IF K$ = "P" AND GAME > 0 THEN GOSUB 4800:GAME = 0: GOTO 100
1020 IF K$ = "S" AND GAME < (T / 2) THEN TS(C) = I: HTAB 10: VTAB 10 + C * 2: PRINT TN$(I):C = C + 1: GOTO 1050 1030 IF K$ = " " THEN 1050 1040 GOTO 990 1050 IF C > 2 THEN I = T
1060 NEXT : IF C < 3 THEN 930 1070 VTAB 18: FOR I = 1 TO 16: PRINT : NEXT 1080 IF MV = 1 THEN MV = 0: GOTO 1240 1090 REM * PREDICT USING SEASON TOTALS * 1100 A1 = (A(TS(1)) + E(TS(2))) / 2 1110 B1 = (B(TS(1)) + F(TS(2))) / 2 1120 C1 = A1 + B1 1130 IF D(TS(1)) = 0 THEN D(TS(1)) = 3 1140 D1 = C(TS(1)) / D(TS(1)) 1150 IF H(TS(1)) = 0 THEN H(TS(1)) = 3 1160 E1 = G(TS(1)) / H(TS(1)) 1170 A2 = (A(TS(2)) + E(TS(1))) / 2 1180 B2 = (B(TS(2)) + F(TS(1))) / 2 1190 C2 = A2 + B2 1200 IF D(TS(2)) = 0 THEN D(TS(2)) = 3 1210 D2 = C(TS(2)) / D(TS(2)) 1220 IF H(TS(2)) = 0 THEN H(TS(2)) = 3 1230 E2 = G(TS(2)) / H(TS(2)): GOTO 1390 1240 REM * PREDICT USING LAST 4 WEEKS * 1250 A1 = (MA(TS(1)) + ME(TS(2))) / 2 1260 B1 = (MB(TS(1)) + MF(TS(2))) / 2 1270 C1 = A1 + B1 1280 IF MD(TS(1)) = 0 THEN MD(TS(1)) = 3 1290 D1 = MC(TS(1)) / MD(TS(1)) 1300 IF MH(TS(1)) = 0 THEN MH(TS(1)) = 3 1310 E1 = MG(TS(1)) / MH(TS(1)) 1320 A2 = (MA(TS(2)) + ME(TS(1))) / 2 1330 B2 = (MB(TS(2)) + MF(TS(1))) / 2 1340 C2 = A2 + B2 1350 IF MD(TS(2)) = 0 THEN MD(TS(2)) = 3 1360 D2 = MC(TS(2)) / MD(TS(2)) 1370 IF MH(TS(2)) = 0 THEN MH(TS(2)) = 3 1380 E2 = MG(TS(2)) / MH(TS(2)) 1390 F1 = (D1 + E2) / 2 1400 G1 = INT ((C1 / F1) + 0.5) 1410 F2 = (D2 + E1) / 2 1420 G2 = INT ((C2 / F2) + 0.5) 1430 REM * DISPLAY WINNER * 1440 GAME = GAME + 1 1450 HTAB 31 + (G1 < 10): VTAB 2: PRINT G1 1460 HTAB 31 + (G2 < 10): VTAB 4: PRINT G2 1470 PRINT : PRINT LINE$: PRINT "THE "; 1480 IF G1 = G2 THEN GOSUB 1590: GOSUB 5000: GOTO 1530 1490 IF G1 > G2 THEN PRINT TN$(TS(1));"WILL DEFEAT THE";
1500 PRINT TN$(TS(2));: IF G1 > G2 THEN PRINT " BY ";G1 - G2;: GOTO 1520
1510 PRINT "WILL DEFEAT THE ";TN$(TS(1));" BY ";G2 - G1;
1520 PRINT " POINTS!"
1530 PRINT : PRINT LINE$
1540 IF G1 > G2 THEN GOSUB 5000
1550 IF G2 > G1 THEN GOSUB 5100
1560 IF GAME = 1 THEN PRINT "(PRINT OPTION COMING UP …)"
1570 GOSUB 2600
1580 HOME : GOTO 890
1590 PRINT TN$(TS(1));" VERSUS THE";
1600 PRINT TN$(TS(2));" IS A TOSS-UP!"
1610 RETURN
1700 REM * REVIEW PAST STATISTICS *
1710 IF W = 0 THEN 100
1720 HOME : PRINT LINE$;" CURRENT WEEK IS WEEK #";W: PRINT LINE$
1730 ONERR GOTO 1720
1740 VTAB 5: PRINT "ENTER NUMBER OF WEEK YOU WISH TO REVIEW"
1750 HTAB 17: VTAB 8: PRINT "=> ";: INPUT R
1760 IF R < 1 OR R > W THEN 1720
1770 F1$ = "WEEKLY.DATA.":F2$ = STR$ (R)
1780 F$ = F1$ + F2$
1790 PRINT D$;"OPEN ";F$: PRINT D$;"READ ";F$
1800 TEMP$ = " STATS FOR WEEK #" + STR$ (R)
1810 GOSUB 3400
1820 PRINT : PRINT "REVISE THESE STATS (Y/N) ?";: GET K$: PRINT
1830 IF K$ < > "Y" THEN 2160
1840 HOME : HTAB 12: PRINT ">>> WARNING <<<": PRINT 1850 PRINT "REVISED STATISTICS WILL BE SAVED TO DISK"; 1860 PRINT "AND BECOME PERMANENT FILE. THIS OPTION" 1870 PRINT "SHOULD ONLY BE USED TO CORRECT BAD DATA" 1880 PRINT "THAT WAS ENTERED EARLIER.": PRINT 1890 PRINT "DO YOU WISH TO PROCEDE (Y/N) ?";: GET K$: PRINT 1900 IF K$ < > "Y" THEN 2120
1910 RV = 1
1920 HOME : PRINT LINE$;"NEW STATISTICS -": PRINT TN$(S);" WEEK #";R: PRINT LINE$
1930 PRINT : PRINT "CHANGE:"
1940 ONERR GOTO 4900
1950 PRINT RO(S);" RUSHING YDS GAINED TO =>";: INPUT RO(S)
1960 PRINT PO(S);" PASSING YDS GAINED TO =>";: INPUT PO(S)
1970 YO(S) = RO(S) + PO(S)
1980 PRINT SO(S);" POINTS SCORED TO =>";: INPUT SO(S): PRINT
1990 PRINT RD(S);" RUSHING YDS GIVEN UP TO =>";: INPUT RD(S)
2000 PRINT PD(S);" PASSING YDS GIVEN UP TO =>";: INPUT PD(S)
2010 YD(S) = RD(S) + PD(S)
2020 PRINT SD(S);" POINTS GIVEN UP TO =>";: INPUT SD(S)
2030 PRINT : PRINT LINE$: PRINT : PRINT "IS THE ABOVE INFO CORRECT (Y/N)? ";: GET K$: PRINT
2040 IF K$ < > "Y" THEN 1920
2050 PRINT : PRINT "REVIEW STATS FOR ANOTHER TEAM (Y/N)? ";: GET K$
2060 PRINT : IF K$ = "Y" THEN 2150
2070 PRINT :RV = 0: POKE 216,0
2080 PRINT D$;"OPEN ";F$: PRINT D$;"CLOSE ";F$: PRINT D$;"DELETE ";F$
2090 PRINT D$;"OPEN ";F$: PRINT D$;"WRITE ";F$: GOSUB 2700:WK = R
2100 FOR I = 1 TO T:A(I) = 0:B(I) = 0:C(I) = 0:D(I) = 0:E(I) = 0:F(I) = 0:G(I) = 0:H(I) = 0: NEXT
2110 GOSUB 4200: GOTO 100
2120 PRINT "REVIEW STATS FOR ANOTHER TEAM (Y/N) ?";: GET K$: PRINT
2130 IF K$ < > "Y" AND RV = 1 THEN 2070
2140 IF K$ < > "Y" THEN 100
2150 GOSUB 3560: IF KY = 3 THEN PRINT : GOTO 1820
2160 PRINT : GOTO 2120
2200 REM * REVIEW SEASON TOTALS *
2210 PRINT D$;"OPEN SEASON.TOTALS"
2220 PRINT D$;"READ SEASON.TOTALS"
2230 TEMP$ = " SEASON TOTALS": GOSUB 3400
2240 PRINT : PRINT : GOSUB 2120: GOTO 2240
2300 REM * EXIT *
2310 HOME : PRINT D$;"FRE": END
2400 REM * PRINT STATISTICS *
2410 HOME : PRINT LINE$;
2420 PRINT TN$(S);TEMP$: PRINT LINE$
2430 PRINT "OFFENSE:"
2440 PRINT " RUSHING YARDS GAINED =>"; LEFT$ (BL$,5 - LEN ( STR$ (RO(S))));RO(S)
2450 PRINT " PASSING YARDS GAINED =>"; LEFT$ (BL$,5 - LEN ( STR$ (PO(S))));PO(S)
2460 PRINT " POINTS SCORED =>"; LEFT$ (BL$,5 - LEN ( STR$ (SO(S))));SO(S): PRINT
2470 PRINT "DEFENSE:"
2480 PRINT " RUSHING YARDS GIVEN UP =>"; LEFT$ (BL$,5 - LEN ( STR$ (RD(S))));RD(S)
2490 PRINT " PASSING YARDS GIVEN UP =>"; LEFT$ (BL$,5 - LEN ( STR$ (PD(S))));PD(S)
2500 PRINT " POINTS GIVEN UP =>"; LEFT$ (BL$,5 - LEN ( STR$ (SD(S))));SD(S): PRINT
2510 PRINT LINE$: GOSUB 2600: RETURN
2600 REM * WAIT FOR KEY *
2610 PRINT "HIT ANY KEY TO CONTINUE …";
2620 GET A$: RETURN
2700 REM * SAVE STATS *
2710 FOR I = 1 TO T
2720 PRINT RO(I): PRINT PO(I): PRINT YO(I): PRINT SO(I): PRINT RD(I): PRINT PD(I): PRINT YD(I): PRINT SD(I)
2730 NEXT : PRINT D$;"CLOSE"
2740 RETURN
2800 REM * READ DATA FILES *
2810 FOR I = 1 TO T
2820 INPUT A(I),B(I),C(I),D(I),E(I),F(I),G(I),H(I)
2830 NEXT : PRINT D$;"CLOSE": RETURN
2900 REM * UPDATE SEASON TOTALS FILE *
2910 FOR I = 1 TO T
2920 PRINT A(I): PRINT B(I): PRINT C(I): PRINT D(I): PRINT E(I): PRINT F(I): PRINT G(I): PRINT H(I)
2930 NEXT : PRINT D$;"CLOSE": RETURN
3000 REM * DETERMINE WEEKLY AVERAGES *
3010 FOR I = 1 TO T
3020 A(I) = A(I) / W:B(I) = B(I) / W
3030 C(I) = C(I) / W:D(I) = D(I) / W
3040 E(I) = E(I) / W:F(I) = F(I) / W
3050 G(I) = G(I) / W:H(I) = H(I) / W
3060 NEXT : RETURN
3100 REM * INPUT SEASON TOTALS *
3110 FOR I = 1 TO T:A(I) = 0:B(I) = 0:C(I) = 0:D(I) = 0
3120 E(I) = 0:F(I) = 0:G(I) = 0:H(I) = 0: NEXT I
3130 PRINT D$;"OPEN SEASON.TOTALS": PRINT D$;"READ SEASON.TOTALS"
3140 GOSUB 2800: RETURN
3200 REM * UPDATE SEASON TOTALS *
3210 IF W > 1 THEN GOSUB 3100
3220 FOR I = 1 TO T
3230 A(I) = A(I) + RO(I):B(I) = B(I) + PO(I)
3240 C(I) = C(I) + YO(I):D(I) = D(I) + SO(I)
3250 E(I) = E(I) + RD(I):F(I) = F(I) + PD(I)
3260 G(I) = G(I) + YD(I):H(I) = H(I) + SD(I)
3270 NEXT I
3280 IF W > 1 THEN PRINT D$;"OPEN SEASON.TOTALS": PRINT D$;"CLOSE SEASON.TOTALS": PRINT D$;"DELETE SEASON.TOTALS"
3290 PRINT D$;"OPEN SEASON.TOTALS": PRINT D$;"WRITE SEASON.TOTALS"
3300 GOSUB 2900: RETURN
3400 REM * INPUT STATISTICS *
3410 POKE 216,0
3420 FOR I = 1 TO T
3430 INPUT RO(I),PO(I),YO(I),SO(I),RD(I),PD(I),YD(I),SD(I)
3440 NEXT : PRINT D$;"CLOSE"
3450 REM * SELECTION AND PRINTING *
3460 ONERR GOTO 3470
3470 HOME : PRINT LINE$;"REVIEWING … ";TEMP$: PRINT LINE$: PRINT
3480 PRINT " (1) PRINT TOTALS FOR ALL ";T;" TEAMS": PRINT
3490 PRINT " (2) DISPLAY TOTALS FOR SELECTED TEAMS"
3500 IF KY = 3 THEN PRINT " (INCLUDES REVISION OPTION)"
3510 PRINT : PRINT " (3) RETURN TO MAIN MENU": PRINT
3520 PRINT LINE$: PRINT "YOUR SELECTION => ";: GET K: PRINT
3530 ON K GOTO 3550,3560,100
3540 IF K < 1 OR K > 3 THEN 3470
3550 POKE 216,0: GOSUB 3700: GOTO 3460
3560 HOME : PRINT LINE$;"REVIEWING … ";TEMP$: PRINT LINE$: PRINT :S = 0
3570 ONERR GOTO 3560
3580 FOR I = 1 TO T: HTAB 2: VTAB 5
3590 HTAB 6: INVERSE : PRINT "SPACE";: NORMAL : PRINT " TO SCROLL THROUGH TEAMS": PRINT
3600 HTAB 8: INVERSE : PRINT "S";: NORMAL
3610 PRINT "ELECT THE ";: INVERSE : PRINT TN$(I): PRINT
3620 NORMAL : VTAB 10: HTAB 8: GET K$: PRINT
3630 IF K$ < > "S" AND K$ < > " " THEN 3620
3640 IF K$ = "S" THEN S = I:I = T
3650 NEXT I: IF S < 1 THEN 3580 3660 GOSUB 2400: RETURN 3700 REM * PRINT STATS FOR ALL TEAMS * 3710 PRINT : PRINT "USE SCREEN OR PRINTER (S/P) ?";: GET K$: PRINT 3720 P = 0: IF K$ = "P" THEN P = 1 3730 IF NOT P THEN 3900 3740 PRINT : PRINT "SET UP PRINTER AND HIT ANY KEY" 3750 GET A$ 3760 PRINT D$;"PR#1" 3770 PRINT TEMP$: PRINT : PRINT 3780 PRINT SPC( 29);"OFFENSE"; 3790 PRINT SPC( 23);"DEFENSE": PRINT 3800 PRINT SPC( 23);"RUSH PASS PTS"; 3810 PRINT " RUSH PASS PTS": PRINT 3820 LP = 7 + T: FOR I = 1 TO T 3830 PRINT TN$(I);" "; LEFT$ (BL$,5 - LEN ( STR$ (RO(I))));RO(I);BL$; 3840 PRINT LEFT$ (BL$,5 - LEN ( STR$ (PO(I))));PO(I);BL$; 3850 PRINT LEFT$ (BL$,5 - LEN ( STR$ (SO(I))));SO(I);BL$; 3860 PRINT " "; LEFT$ (BL$,5 - LEN ( STR$ (RD(I))));RD(I);BL$; 3870 PRINT LEFT$ (BL$,5 - LEN ( STR$ (PD(I))));PD(I);BL$; 3880 PRINT LEFT$ (BL$,5 - LEN ( STR$ (SD(I))));SD(I);BL$ 3890 NEXT : PRINT D$;"PR#0": GOSUB 4500: GOTO 3910 3900 FOR S = 1 TO T: GOSUB 2400: NEXT S 3910 RETURN 4000 REM * INPUT LAST 4 WEEKS STATS * 4010 PRINT D$;"FRE" 4020 HOME :F1$ = "WEEKLY.DATA." 4030 FOR J = W - 3 TO W:F2$ = STR$ (J):F$ = F1$ + F2$ 4040 PRINT D$;"OPEN ";F$: PRINT D$;"READ ";F$ 4050 FOR I = 1 TO T 4060 INPUT K:MA(I) = MA(I) + K: INPUT K:MB(I) = MB(I) + K 4070 INPUT K:MC(I) = MC(I) + K: INPUT K:MD(I) = MD(I) + K 4080 INPUT K:ME(I) = ME(I) + K: INPUT K:MF(I) = MF(I) + K 4090 INPUT K:MG(I) = MG(I) + K: INPUT K:MH(I) = MH(I) + K 4100 NEXT I: PRINT D$;"CLOSE": NEXT J 4110 GOSUB 4700: RETURN 4200 REM * REVISE SEASON TOTALS FILE * 4210 PRINT : PRINT "RE-TOTALLING ALL FILES - THIS MAY TAKE" 4220 PRINT " A FEW MOMENTS …": PRINT 4230 POKE 216,0 4240 F1$ = "WEEKLY.DATA." 4250 FOR J = W TO 1 STEP - 1 4260 F2$ = STR$ (J):F$ = F1$ + F2$ 4270 PRINT D$;"OPEN ";F$: PRINT D$;"READ ";F$ 4280 FOR I = 1 TO T 4290 INPUT K:A(I) = A(I) + K: INPUT K:B(I) = B(I) + K 4300 INPUT K:C(I) = C(I) + K: INPUT K:D(I) = D(I) + K 4310 INPUT K:E(I) = E(I) + K: INPUT K:F(I) = F(I) + K 4320 INPUT K:G(I) = G(I) + K: INPUT K:H(I) = H(I) + K 4330 NEXT I: PRINT D$;"CLOSE" 4340 IF J = W - 3 THEN GOSUB 4400 4350 NEXT J: PRINT D$;"OPEN SEASON.TOTALS": PRINT D$;"WRITE SEASON.TOTALS" 4360 GOSUB 2900: GOSUB 3000 4370 PRINT D$;"FRE": RETURN 4400 REM * REVISE 4-WEEK AVERAGE * 4410 FOR I = 1 TO T:MA(I) = A(I):MB(I) = B(I):MC(I) = C(I):MD(I) = D(I) 4420 ME(I) = E(I):MF(I) = F(I):MG(I) = G(I):MH(I) = H(I): NEXT I 4430 GOSUB 4700: RETURN 4500 REM * SKIP TO TOP OF PAGE * 4510 PRINT D$;"PR#1": FOR I = 1 TO 66 - LP 4520 PRINT : NEXT :LP = 0: PRINT D$;"PR#0": RETURN 4600 REM * SUBSTITUTE AVERAGES * 4610 RO(I) = INT (A(I)):PO(I) = INT (B(I)):YO(I) = INT (C(I)):SO(I) = INT (D(I)) 4620 RD(I) = INT (E(I)):PD(I) = INT (F(I)):YD(I) = INT (G(I)):SD(I) = INT (H(I)): RETURN 4700 REM * FOUR WEEK AVERAGE * 4710 FOR I = 1 TO T 4720 MA(I) = MA(I) / 4:MB(I) = MB(I) / 4 4730 MC(I) = MC(I) / 4:MD(I) = MD(I) / 4 4740 ME(I) = ME(I) / 4:MF(I) = MF(I) / 4 4750 MG(I) = MG(I) / 4:MH(I) = MH(I) / 4 4760 NEXT : RETURN 4800 REM * PRINT PREDICTION REPORT * 4810 HOME : PRINT "SET UP PRINTER AND HIT ANY KEY … ";: GET A$ 4820 ONERR GOTO 4830 4830 PRINT : INPUT "HOW MANY COPIES? ";K 4840 POKE 216,0: PRINT D$;"PR#1": FOR I = 1 TO K 4850 PRINT " FOOTBALL PREDICTIONS FOR WEEK #";W + 1: PRINT 4860 PRINT " FAVORITE"; SPC( 17);"UNDERDOG"; SPC( 11);"SPREAD" 4870 FOR J = 1 TO GAME: PRINT PRED$(J): NEXT J:LP = GAME + 4 4880 GOSUB 4500: NEXT I: PRINT D$;"PR#0": RETURN 4900 REM * ERROR TRAPS * 4910 CALL 768:ER = PEEK (222) 4920 LN = PEEK (218) + 256 * PEEK (219) 4930 IF ER = 6 THEN 100 4940 IF ER = 5 AND LN = 5470 THEN 100 4950 IF ER = 254 THEN PRINT "TRY AGAIN!": RESUME 4960 PRINT " ERROR #";ER;" AT LINE ";LN 4970 GOSUB 2600: GOTO 100 5000 REM * TEAM 1 IS FAVORITE * 5010 PRED$(GAME) = TN$(TS(1)) + BL$ + TN$(TS(2)) + BL$ + STR$ (G1 - G2): RETURN 5100 REM * TEAM 2 IS FAVORITE * 5110 PRED$(GAME) = TN$(TS(2)) + BL$ + TN$(TS(1)) + BL$ + STR$ (G2 - G1): RETURN 5200 REM * INITIALIZATION * 5210 FOR I = 0 TO 9: READ J: POKE 768 + I,J: NEXT 5220 T = 28: REM # OF TEAMS 5230 DIM A(T),B(T),C(T),D(T),E(T),F(T),G(T),H(T) 5240 DIM MA(T),MB(T),MC(T),MD(T),ME(T),MF(T),MG(T),MH(T) 5250 DIM RO(T),PO(T),YO(T),SO(T),RD(T),PD(T),YD(T),SD(T) 5260 LINE$ = "----------------------------------------" 5270 DIM PRED$(T / 2): DIM TS(2) 5280 D$ = CHR$ (4):BL$ = " " 5290 HOME : VTAB 12: HTAB 8 5300 INVERSE : PRINT " FOOTBALL PROGNOSTICATOR ": NORMAL 5310 VTAB 18: HTAB 7: PRINT "(BE SURE CAPS LOCK IS DOWN)" 5320 POKE 34,20: HOME : HTAB 5 5330 PRINT "FOR ENTERTAINMENT PURPOSES ONLY!" 5340 PRINT : HTAB 5 5350 PRINT "BY DAVID COWLES & BILL MARQUARDT" 5360 FOR I = 1 TO 2000: NEXT 5370 DIM TN$(T) 5380 TEMP$ = " " 5390 FOR I = 1 TO T: READ F$:TN$(I) = F$ + RIGHT$ (TEMP$,21 - LEN (F$)): NEXT 5400 HOME : PRINT "ENSURE THAT PROPER DATA DISK IS IN DRIVE"; 5410 PRINT " AND HIT "
5420 GET A$
5430 PRINT : HOME :W = 0
5440 ONERR GOTO 4900
5450 PRINT D$;"OPEN WEEK.NUMBER"
5460 PRINT D$;"READ WEEK.NUMBER"
5470 INPUT W: PRINT
5480 PRINT D$;"CLOSE"
5490 IF W < 1 THEN 100 5500 IF W > 4 THEN GOSUB 4000
5510 GOSUB 3100: GOSUB 3000
5520 RETURN
5600 REM * ERROR-HANDLING ROUTINE *
5610 DATA 104,168,104,166,223,154,72,152,72,96
5700 REM * 28 NFL TEAMS *
5710 DATA ATLANTA FALCONS,BUFFALO BILLS,CHICAGO BEARS,CINCINNATI BENGALS
5720 DATA CLEVELAND BROWNS,DALLAS COWBOYS,DENVER BRONCOS,DETROIT LIONS
5730 DATA GREENBAY PACKERS,HOUSTON OILERS,INDIANAPOLIS COLTS,KANSAS CITY CHIEFS
5740 DATA LOS ANGELES RAIDERS,LOS ANGELES RAMS,MIAMI DOLPHINS,MINNESOTA VIKINGS
5750 DATA NEW ENGLAND PATRIOTS,NEW ORLEANS SAINTS,NEW YORK GIANTS,NEW YORK JETS
5760 DATA PHILADELPHIA EAGLES,PITTSBURGH STEELERS,SAN DIEGO CHARGERS,SAN FRANCISCO 49ERS
5770 DATA SEATTLE SEAHAWKS,ST. LOUIS CARDINALS,TAMPA BAY BUCCANEERS,WASHINGTON REDSKINS

Program Converter for ProDOS to DOS 3.3

10 REM * FOOTBALL.DOC
20 REM * II COMPUTING VOL.1 NO.1
30 REM * (C) 1985 ANTIC PUBLISHING, INC.
40 HOME : PRINT
50 PRINT "--------FOOTBALL PROGNOSTICATOR---------"
60 HTAB 15: INVERSE : PRINT " WARNING! ": NORMAL
70 PRINT : PRINT "THIS PROGRAM MUST BE TRANSFERRED TO A"
80 PRINT "BLANK FORMATTED DISK IN ORDER TO ACQUIRE";
90 PRINT "NECESSARY DATA."
100 PRINT : PRINT "DOS 3.3 USERS USE THE PROGRAM CONVERT"
110 PRINT "ON THIS DISK BY TYPING: -CONVERT"
120 PRINT "FOLLOW THE PROMPTS. YOU SHOULD TRANSFER"
130 PRINT "THE FILE 'FOOTBALL.PROG' TO DOS 3.3"
140 PRINT : PRINT "SEE ARTICLE FOR DOS 3.3 MODIFICATIONS."
150 NEW
Please follow and like us:

About the Author