Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add outs in Linescore model #19

Merged

Conversation

faskowbn
Copy link

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.
InningNumber Cint  4 m

I also ensured that outs is being propagated as expected using an inning before the current inning.
OffensiveTeamPitcherName  string  null

@markjamesm markjamesm self-requested a review May 5, 2024 16:41
@markjamesm markjamesm self-assigned this May 5, 2024
Copy link
Owner

@markjamesm markjamesm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for your PR!

@markjamesm markjamesm merged commit 06a941b into markjamesm:master May 5, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants