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

Fixes #62 #115

Merged
merged 2 commits into from
Oct 11, 2018
Merged

Fixes #62 #115

merged 2 commits into from
Oct 11, 2018

Conversation

trevor-viljoen
Copy link
Contributor

This PR is meant to address #62, where a key may not be found in certain game situations. This adds a function to check for the key. If the key exists and is not an empty string, the value is returned. Otherwise 0 is assumed to be the number of runs scored.

There are tests for each scenario:

  1. Bot of the 9th: 'X' for home team.
  2. An integer for home or away
  3. Key not found
  4. An empty string: ''.

If an empty string is found or the home/away key is not found, return 0
runs for the half inning, otherwise return the value from the key.
@panzarino panzarino merged commit 98e34e6 into panzarino:master Oct 11, 2018
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.

None yet

2 participants