1.4.3 • Published 11 months ago

bowling v1.4.3

Weekly downloads
6
License
MIT
Repository
github
Last release
11 months ago

node-bowling

Node.js CI js-standard-style Known Vulnerabilities

📝 scorekeeping for ten pin bowling 🎳

  • supports complete and incomplete games
  • 100% test coverage
  • zero dependencies

NPM

install

npm install bowling

test

npm test

usage

var bowl = require('bowling')


var aCompleteGame = ['81','9-','9/','71','9-','X','90','70','x','7-'],
    result

result = bowl(aCompleteGame)

console.log(result)

/*
[
  {outcome: '81', cumulative: 9, score: 9},
  {outcome: '9-', cumulative: 18, score: 9},
  {outcome: '9/', cumulative: 35, score: 17},
  {outcome: '71', cumulative: 43, score: 8},
  {outcome: '9-', cumulative: 52, score: 9},
  {outcome: 'X', cumulative: 71, score: 19},
  {outcome: '9-', cumulative: 80, score: 9},
  {outcome: '7-', cumulative: 87, score: 7},
  {outcome: 'X', cumulative: 104, score: 17},
  {outcome: '7-', cumulative: 111, score: 7}
]
*/

example

example.js: a script that shows how a game could be scored progressively

Example

also: a live-updating terminal scoreboard

notes

  • miss: 0 or -
  • strike: x or X
  • foul: f or F
1.4.3

11 months ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.12

4 years ago

1.3.11

4 years ago

1.3.10

5 years ago

1.3.9

6 years ago

1.3.8

7 years ago

1.3.7

7 years ago

1.3.6

8 years ago

1.3.5

8 years ago

1.3.4

8 years ago

1.3.3

9 years ago

1.3.2

9 years ago

1.3.0

10 years ago

1.2.6

10 years ago

1.2.5

10 years ago

1.2.4

10 years ago

1.2.2

11 years ago

1.2.1

11 years ago

1.2.0

11 years ago

1.1.0

11 years ago

1.0.0

11 years ago