Skip to content

remarkablemark/bowling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bowling

Ruby solution for the Bowling Kata.

Install

Prerequisites:

$ git clone https://github.com/remarkablemark/bowling.git
$ cd bowling
$ bundle install

Usage

Example of rolling and scoring a perfect game:

$ irb
> require_relative './lib/Bowling'
> bowling = Bowling.new
> 12.times { bowling.roll(10) }
> bowling.score
=> 300
> exit

Testing

Run unit tests with rspec:

$ bundle exec rspec --format doc

Docs

Generate docs with YARD:

$ bundle exec yard doc
$ open docs/index.html

Layout

├── Gemfile
├── Gemfile.lock
├── LICENSE
├── README.md
├── lib
│   └── Bowling.rb
└── spec
    ├── bowling_spec.rb
    └── spec_helper.rb

License

MIT