- Install NodeJS and NPM if you don't already have it on your system
- Run
npm i
ornpm install
- To run main CLI program:
node main.js <player name> <rolls>
- To run unit tests:
npm test
- Make sure you have Docker installed
- Run
docker build -t <bowling> .
- Check that image has been built:
docker images
- Run the image:
docker run -p 49160:8080 <bowling>
- All the unit tests will be run in a docker container :)
- If you want to run a game, comment out
CMD ["npm","test"]
on Dockerfile and uncomment the test user game CMD, then rebuild image and run container
- 81 9- 9/ 71 9- x 90 70 x 71
- x x x x x x x x x xxX (Perfect game)
- x 7/
- 23
- 3/ x 6
- One game: 10 frames, score range 0 - 300, each frame has two chances to known down 10 pins
- Knocking down all ten pins with first ball = strike (X)
- Worth 10 plus value of next two rolls
- Minimum = 10 (10 + 0 + 0)
- Maximum = 30 (10 + 10 + 10)
- E.g. 1 strike in first frame, 6 then 2 balls in second frame (10 + 6 + 2)
- If two shots to knock down all pins = spare (/)
- Worth 10 plus value of next roll
- Maximum = 20 (10 + 10), spare then strike
- Minimum = 10 (10 + 0), spare then gutter ball
- If after two shots at least one pin is standing
- Score is total number of pins knocked down