A simple implemetation of Bowling scores system.
References rules are from bowling2u.com/trivia/game/scoring.asp
- create game with up to 5 players.
- input of frame has validations.
- player can input their rolls multiple times, the score up to current frame will be displayed.
- for strike/spare, if the bonus ball(s) is/are not rolled yet, score of the frame will displayed as
__. - after player finished, final score is displayed.
- after all players finished, game status/winner will be updated, and winner row wll be highted.
-
clone the repo
-
run bundle and migration
bundle install && bundle exec rake db:migrate
- start server
bundle exec rails s
This example using Rspec
bundle exec rspec spec
A demo can be found at heroku