Skip to content

razorcd/bowling-game

Repository files navigation

Build Status

Bowling Game Score Board API

Rules:

- https://en.wikipedia.org/wiki/Ten-pin_bowling

- https://www.youtube.com/watch?v=aBe71sD8o8c

Start the server and call the REST JSON API or try the rough SPA demo at http://localhost:3000/demo

Read the API documentation for endpoints details.

LIVE DEMO

Development

  • bundle to install dependencies
  • rspec to run tests

TODO

  • implement game logic using TDD (test first)
  • persist it's state to handle stateless requests
  • add integration tests
  • add REST Endpoints for Game on create, show, update
  • investigate 2 strikes on last grame
  • handle required params
  • update status code to be more expressive
  • replace .to_i in controller because "s".to_i == 0 in ruby. (Now update_params checks for non digits)
  • pessimistic locking on DB row while updating so API is thread safe / multiprocess safe
  • move GamesController#index and cleanup view
  • add API docs
  • add license
  • add CI (with Travis)
  • deploy to Heroku
  • disable assets and compilation
  • expose the score by frame trough the API
  • add /api route namespacing and ensure default json content-type
  • add app semantic versioning including api versioning (e.g. /api/v1)
  • cache GamesController#show. Added casched method Game.cached_find_by_id to cache accessed game records
  • add in memory caching and separate cache location by environment