Skip to content

edlowther/bowling-challenge

 
 

Repository files navigation

Bowling Challenge

This project implements in JavaScript a way of calculating the total score for a game of 10-pin bowling. The scoring algorithm can be accessed by typing into the browser console of the index.html file:

var game = new Game();

and then:

game.addRoll(numberOfPinsKnockedDown);

for each roll.

I decided to focus this weekend on trying to make the code as robust and readable as possible, and an obvious next step would be to make it more accessible by hooking the logic up to HTML input fields.

The project assumes anyone using it will enter accurate data, and so does not raise errors if, say, a bowler appears to have knocked down more than 10 pins in one frame, or if they seem to be continuing beyond 10 frames in one game, so there is room for improvement here too.

About

Calculate Scores for Ten Pin Bowling

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.1%
  • HTML 1.9%
  • Ruby 1.6%
  • CSS 0.4%