Skip to content

johneckert/nat20

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nat20

Build Status DUB

Description

RubyGems Page

Nat20 adds easy to use dice rolling functionality with input in the style of table top role playing games. It provides functionality for single and multiple rolls and can return either an array of dice values or total roll.

Requirements

  • Ruby 2.3
  • RSpec 3.7 (to run tests)

Installation

gem install nat20

Usage and documentation

For a single roll use Nat20.roll

Usage Example:

Nat20.roll '2d6+3'
=> 10

Nat20.roll '2d6-3', true
=> [3, 4, -3]

For multiple rolls use Nat20.roll_multiple

Usage Example:

Nat20.roll_multiple 2d6, 3 => [6, 10, 8]

Contributing

To contribute to Nat20, clone this repo locally and commit your code on a separate branch. Please write unit tests for your code before opening a pull-request.

License

Nat20 is licensed under the MIT license. Copyright © 2018, John Eckert


About

Ruby Gem for rolling dice RPG style

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages