Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm working on a fun side project, and having the number of outs in each Linescore would help me with some business logic -- specifically, whether the game is done. Without knowing the number of outs in the last (and current) inning, it's challenging to know whether the inning is ongoing or completed.
The api has a somewhat odd structure in that
outs
are not associated with each inning; it is only on the outer layer. So in the code, we assume that every inning before the current one has had 3 outs. Knowing baseball well, I think this is a reasonable invariant!I ensured that
outs
is being propagated as expected using the sample program for a current inning.I also ensured that
outs
is being propagated as expected using an inning before the current inning.