title | description | class | toc | order | image | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
tdd-bowling-kata |
An implementation of the classic bowling kata for a TDD exercise |
beginners |
|
2 |
/assets/images/cards/beginner.png |
- No judgment, Nothing that happens inside this room will be reported to anyone outside it. The point is to try things out and learn from getting it wrong.
- No governance, you can pick whatever tools and programming languages you like.
- There are no right answers, it’s ok to come to different solutions. We will make various trade-offs along the way.
- Red, Green, Refactor.
- Code coverage statistics as a bonus.
- The game consists of 10 frames.
- In each frame the player has two opportunities to knock down 10 pins.
- The score for the frame is the total number of pins knocked down, plus bonuses for strikes and spares.
- A spare is when the player knocks down all 10 pins in two tries. The bonus for that frame is the number of pins knocked down by the next roll.
- A strike is when the player knocks down all 10 pins on his first try. The bonus for that frame is the value of the next two balls rolled.
- In the tenth frame a player who rolls a spare or strike is allowed to roll the extra balls to complete the frame. However no more than three balls can be rolled in tenth frame.
- The worst player in the world, hits all gutter balls, scores zero.
- The most consistent player in the world, hits one pin every time, scores 20.
- Can calculate a spare correctly, followed by a 3 score, scores 16.
- Can calculate a strike correctly, followed by a 3 and another 3, scores 22.
- Bowls a perfect game, scores 300.