Skip to content

Make bowling readme less object-oriented specific. #73

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

Merged
merged 1 commit into from
Apr 19, 2015

Conversation

pminten
Copy link
Contributor

@pminten pminten commented Apr 19, 2015

Please note that I don't think I've ever played a game of bowling in my life, so it could be I broke the description of the rules.

@kytrinyx
Copy link
Member

This looks correct to me (although I believe I've only played bowling once, and only because they guilted me into participating).

kytrinyx added a commit that referenced this pull request Apr 19, 2015
Make bowling readme less object-oriented specific.
@kytrinyx kytrinyx merged commit 23881bf into exercism:master Apr 19, 2015
@Dog
Copy link
Contributor

Dog commented Apr 19, 2015

When I was younger I bowled in a league.

A frame is composed of one or two ball throws with ten pins standing at frame initialization. There are three cases for the tabulation of a frame.

  • An open frame is where a score of less than 10 is recorded for the frame. In this case the score for the frame is the number of pins knocked down.
  • A spare is where all ten pins are knocked down after the second throw. The total value of a spare is 10 plus the number of pins knocked down in their next throw.
  • A strike is where all ten pins are knocked down after the first throw. The total value of a strike is 10 plus the number of pins knocked down in their next two throws. If a strike is immediately followed by a second strike, then we can not total the value of first strike until they throw the ball one more time.

Here is a three frame example:

Frame 1 Frame 2 Frame 3
X (strike) 5/ (spare) 9 0 (open frame)

Frame 1 is (10 + 5 + 5) = 20
Frame 2 is (5 + 5 + 9) = 19
Frame 3 is (9 + 0) = 9

This means the current running total is 48.

The tenth frame in the game is a special case. If someone throws a strike or a spare then they get a fill ball. Fill balls exist to calculate the total of the 10th frame. Scoring a strike or spare on the fill ball does not give the player more fill balls. The total value of the 10th frame is the total number of pins knocked down.

Assume a tenth frame of:
X1/

Here the total value of the 10th frame is 20.

Assume a tenth frame of:
XXX

Here the total value of the 10th frame is 30.

I think the readme still isn't clear enough for special case of the tenth frame. Let me know if you like this explanation and I'll submit a pull request.

@pminten
Copy link
Contributor Author

pminten commented Apr 19, 2015

Thanks. Would you mind if we use your explanation I in the readme? It's clearer than what it currently says.

Considering the not too low not too high complexity of the notation it may actually make a good theme for a second exercise: parse a bowling scoreboard and determine if it's valid.

"I can not only fetch JSON, but parse it too." [email protected] schreef op 19 april 2015 19:52:50 CEST:

When I was younger I bowled in a league.

A frame is composed of one or two ball throws with ten pens standing at
frame initialization. There are three cases for the tabulation of a
frame.

  • An open frame is where a score of less than 10 is recorded for the
    frame. In this case the score for the individual frame is the number of
    pins knocked down.
  • A spare is where all ten pens are knocked down after the second throw
    is called a spare. The total value of a spare is 10 plus the value of
    their next immediate throw.
  • A strike is where all ten pens are knowcked down after the firt
    throw. The total value of a strike is 10 plus the value of their next
    two immediate throws.

Here is a three frame example:
1 2 3
X 5/ 90

Frame 1 is (10 + 5 + 5) = 20
Frame 2 is (5 + 5 + 9) = 19
Frame 3 is (9 + 0) = 9

This means the current running total is 48.

The tenth frame in the game is a special case. If someone throws a
strike or a spare then they get a fill ball. Fill balls exist to
calculate the total of the 10th frame. Scoring a strike or spare on the
fill ball does not give the player more fill balls. The total value of
the 10th frame is the total number of pins knocked down.

Assume a tenth frame of:
X1/

Here the total value of the 10th frame is 20.

Assume a tenth frame of:
XXX

Here the total value of the 10th frame is 30.


Reply to this email directly or view it on GitHub:
#73 (comment)

Verzonden van mijn Android telefoon met K-9 Mail.

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