ParaDice

Build Status Code Climate Test Coverage Dependency Status PullReview stats

An extensible dice gem.

Introduction

ParaDice is a ruby library that provides customizable dice and results of rolling one or more.

Installation

Add this line to your application's Gemfile:

gem 'para_dice'

And then execute:

$ bundle

Or install it yourself as:

$ gem install para_dice

Usage

require para_dice

# Use a set of polyhedral dice
bag = ParaDice::GenerateDiceBag.poly
#   Get a dice cup to roll 3 d6 in this case
cup = bag.take_cup([:d6, :d6, :d6])
cup.roll! # [4, 2, 4]
result = cup.roll # ParaDice::Results::Sum object
result.raw # [4,2,

Contributing

  1. Fork it ( https://github.com/anithri/para_dice/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request