Pigskin Picks

Developer(s): Tom Proffitt
Date: 1986
Type: Program
Platform(s): TS 2068

Pigskin Picks is a sports prediction program that calculates a comparative score rating for two competing teams, intended for use in football (and optionally basketball) game prediction. For each team, the user enters points scored, points allowed, and games played; the program then averages each team’s offensive output against the opponent’s defensive weakness to produce a projected score. The formula used is `((points-for / games) + (opponent-points-against / games)) / 2`, blending a team’s scoring average with the rival’s defensive average. The program loops continuously via `GO TO 40`, allowing repeated matchup comparisons in a single session. A `POKE 23609,70` call adjusts the keyboard repeat rate for a smoother input experience.


Program Structure

The program is compact and linear, organized into four logical phases across just a handful of lines:

  1. Setup (lines 30–50): Sets display attributes, pokes the repeat delay, and prints a header banner.
  2. Team 1 input (lines 60–80): Collects team name, points-for, points-against, and games played.
  3. Team 2 input (lines 90–110): Collects the same statistics for the opposing team.
  4. Output and loop (lines 120–140): Prints projected scores and jumps back to line 40 for another matchup.

Prediction Formula

The rating computed for each team is:

  • Team 1 score: INT ((c/e + j/k) / 2) — average of Team 1’s points-per-game and Team 2’s points-allowed-per-game.
  • Team 2 score: INT ((d/e + i/k) / 2) — average of Team 1’s points-allowed-per-game and Team 2’s points-per-game.

This cross-averages each team’s offensive output with the opponent’s defensive concession rate, giving a rough prediction of how many points each side might score. The use of INT truncates the result to a whole number, appropriate for a sports score context.

Variable Usage

VariableMeaning
a$Team 1 name
cTeam 1 points-for
dTeam 1 points-against
eTeam 1 games played
f$Team 2 name
iTeam 2 points-for
jTeam 2 points-against
kTeam 2 games played

Variables b, g, and h are notably absent, suggesting they were either used in an earlier draft or skipped intentionally to group related statistics loosely by letter.

Key BASIC Idioms and Techniques

  • INPUT "prompt "; LINE a$ is used for the team name inputs, allowing spaces within the name — essential for multi-word team names.
  • Multiple INPUT prompts are chained on a single line using the ' separator (lines 70 and 100), saving line numbers and screen space.
  • PRINT ':' on line 140 prints a blank line before looping, providing visual separation between successive matchup results.
  • GO TO 40 rather than GO TO 30 deliberately skips the attribute-setting and POKE on each loop iteration, avoiding redundant system calls while still re-displaying the header.

System Customization

POKE 23609,70 writes to the system variable REPDEL, which controls the delay before a held key begins auto-repeating. The default value is 35; raising it to 70 doubles the initial pause, reducing accidental repeated characters during data entry.

Bugs and Anomalies

  • There is no guard against dividing by zero. If the user enters 0 for games played (e or k), a division-by-zero error will halt the program.
  • The CLS on line 30 is only executed once at startup; subsequent loop iterations do not clear the screen, so results accumulate on the display. This could be intentional to allow comparison of multiple matchups, but the screen will eventually scroll.
  • The header banner printed at line 40 is re-printed on every loop iteration before each new matchup, which may clutter the output over multiple runs.

Source Code

  10 REM \{20}\{1}>>  Pigskin Picks  <<\{20}\{0}                                  by Tom Proffitt                           \* Time Designs, N/D 86 
  20 REM \{16}\{2}"Pigskin Picks" can also be used for Basketball.  It works best after the fourth game.  "Not to be used for gambling if you want to keep your money!"\{16}\{0}   
  30 BORDER 1:PAPER 1:INK 7:CLS :POKE 23609,70
  40 PRINT TAB 8;"PIGSKIN PICKS"
  50 PRINT "********************************"
  60 INPUT "Enter 1st team "; LINE a$
  70 INPUT "POINTS-FOR ";c'"POINTS-AGAINST ";d
  80 INPUT "Enter games played ";e
  90 INPUT "Enter 2nd team "; LINE f$
 100 INPUT "POINTS-FOR ";i'"POINTS-AGAINST ";j
 110 INPUT "Enter games played ";k
 120 PRINT a$;" "; INT ((c/e)+(j/k))/2
 130 PRINT f$;" "; INT ((d/e)+(i/k))/2
 140 PRINT ':GO TO 40

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.