Skip to content

Commit 23881bf

Browse files
committed
Merge pull request #73 from pminten/bowling-less-oo
Make bowling readme less object-oriented specific.
2 parents d5b3992 + 22f710e commit 23881bf

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

bowling.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Bowling is game where players roll a heavy ball to knock down pins
2+
arranged in a triangle. Write code to keep track of the score
3+
of a game of bowling.
4+
15
## Scoring Bowling
26

37
The game consists of 10 frames. In each frame the player has two
@@ -6,20 +10,22 @@ total number of pins knocked down, plus bonuses for strikes and spares.
610

711
A spare is when the player knocks down all 10 pins in two tries. The
812
bonus for that frame is the number of pins knocked down by the next
9-
roll. So in frame 3 above, the score is 10 (the total number knocked
10-
down) plus a bonus of 5 (the number of pins knocked down on the next
11-
roll.)
13+
roll. For example a player rolls in the first three frames respectively
14+
4+2, 3+7 and 5+1. For frame 2, the score is 10 (the total number knocked
15+
down) plus a bonus of 5 (the number of pins knocked down on the next roll.)
1216

1317
A strike is when the player knocks down all 10 pins on his first try.
14-
The bonus for that frame is the value of the next two balls rolled.
18+
The bonus for that frame is the value of the next two balls rolled
19+
(the value of the next frame, not counting the bonus).
1520

1621
In the tenth frame a player who rolls a spare or strike is allowed to
1722
roll the extra balls to complete the frame. However no more than three
1823
balls can be rolled in tenth frame.
1924

2025
## Requirements
2126

22-
Write a class named “Game” that has two methods:
27+
Write code to keep track of the score of a game of bowling. It should
28+
support two operations:
2329

2430
* `roll(pins : int)` is called each time the player rolls a ball. The
2531
argument is the number of pins knocked down.

0 commit comments

Comments
 (0)