Skip to content

henrygarner/BowlingNode

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 

Node.js Bowling Scorecard

This code is an implementation of a linearly recursive bowling scorer following the rules from Wikipedia.

It does not use mutable state. Once created values don't change.

The main entrypoint is the Game.score() function which accepts rolls from one player as a sequence of arguments. The Game.score() function delegates work to the recursive Game._scorer(). This iterates over all provided rolls keeping track of any bonuses which are due.

To Run Tests

npm test

On Recursion

For more information on recursion, consult the Factorial example from SICP.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published