A Javascript programme built in a test-driven environment, using Jasmine for testing. The program has a html/css front end along with a jQuery User Interface.
# clone this repo
open index.html # open in the browser from the command line
# bowl away!
# clone this repo
open SpecRunner.html # open in the browser from the command line
Read up on the rules here
The player has a strike if he knocks down all 10 pins with the first roll in a frame. The frame ends immediately (since there are no pins left for a second roll). The bonus for that frame is the number of pins knocked down by the next two rolls. That would be the next frame, unless the player rolls another strike.
The player has a spare if the knocks down all 10 pins with the two rolls of a frame. The bonus for that frame is the number of pins knocked down by the next roll (first roll of next frame).
The game is over when the frame count reaches 20
The program uses Jasmine to test drive the Javascript program.
CSS buttons sourced from codepen.io
Fonts sourced from Google Fonts