Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stefanopisano/bowlinggamekata
Kata exercise for TDD development.
https://github.com/stefanopisano/bowlinggamekata
java kata tdd
Last synced: about 9 hours ago
JSON representation
Kata exercise for TDD development.
- Host: GitHub
- URL: https://github.com/stefanopisano/bowlinggamekata
- Owner: StefanoPisano
- Created: 2021-07-08T12:29:49.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-08T12:37:15.000Z (over 3 years ago)
- Last Synced: 2024-11-10T22:19:57.005Z (about 2 months ago)
- Topics: java, kata, tdd
- Language: Java
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Credits
_Inspired by Uncle Bob_
___
### Bowling RulesThe game consists of 10 frames. In each frame the player has two rolls 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 rolls. 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 roll. The frame is then completed with a single roll. The bonus for that frame is the value of the next two rolls.
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.
RequirementsWrite a class Game that has two methods
1. void roll(int) is called each time the player rolls a ball. The argument is the number of pins knocked down.
2. int score() returns the total score for that game.