Bowling Score
This small project is a scoring system for bowling games. You can try it online here.
Implementation:
- A game consists of 10 frames.
- In general each frame has 2 rolls.
- In general a player scores the number of pins knocked down.
- If the player knocks down all 10 pins on the first roll it’s a strike. The player scores 10 plus the number of pins knocked down in the next two rolls.
- If the player knocks down all 10 pins in two rolls it’s a spare. The player scores 10 plus the number of pins knocked down in the next roll.
- The player gets additional rolls in the last frame: (optional)
- one additional for a spare after the second roll, or
- two extra rolls for a strike.
- Visualize the scoring of the game.
- Create a method that randomly throws a roll (one roll is 1-10 pins knocked down), and progresses the scoring.
Running
The build folder is added to the git repository, so you can just open build/index.html
in your browser.
Building
Ensure that you have Node.js/io.js installed and Gulp client (npm install -g gulp
). To build the project, just execute:
npm install
gulp build
# look in the build/ directory.
If you want the project to be built continuously, just execute gulp
without any arguments. It runs gulp in watch mode.
Testing
To test the game logic, run gulp test
. The UI is manually tested in Firefox 37, Chrome 42, and Safari 8, all on Mac OS X.