zcs-cs / Baseball-Reporter

The 2014-2015 AP Computer Science A class's final project that analyzes baseball statistics and compiles an automated news report.
GNU General Public License v2.0
0 stars 0 forks source link

People on base when a new pitcher entered #16

Closed avandesa closed 9 years ago

avandesa commented 9 years ago

There are three conditions for a save. From Wikipedia:

  1. He enters the game with a lead of no more than three runs and pitches for at least one inning
  2. He enters the game, regardless of the count, with the potential tying run either on base, at bat or on deck
  3. He pitches for at least three innings.

We already have 1. and 3. programmed. However, for the second one, we would need data for how many people were on base when each new pitcher entered (or at least when the last pitcher entered). The potential to tie means that the total number of people at bat (always 1), on deck (always 1), and on base is at least the difference between the scores. So, if the difference in score is less than 2, then the condition is covered by condition 1. Therefore, if we don't have data for the number of people on base when each pitcher entered, then we'll just ignore this condition.

avandesa commented 9 years ago

Not going to worry about this. Our module is finished.