# Hazard a random library with weighted tables

**URL:** <https://metaruby.com/t/hazard-a-random-library-with-weighted-tables/1674>\
**Category:** Ruby Chat\
**Tags:** ruby\
**Created:** [May 4, 2018, 1:54pm UTC](https://metaruby.com/t/hazard-a-random-library-with-weighted-tables/1674 "2018-05-04T13:54:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![czuger](https://metaruby.com/user_avatar/metaruby.com/czuger/32/782_2.png) [@czuger](https://metaruby.com/u/czuger)\
**Post date:** [May 4, 2018, 1:54pm UTC](https://metaruby.com/t/hazard-a-random-library-with-weighted-tables/1674/1 "2018-05-04T13:54:41Z")

</div>

Hello,

I wrote a small library for dice simulation.

You can simply roll dice like :  
Hazard.d6 (rolls a 6 sided dice).  
Hazard.d3d6 (rolls 3 6 sided dice).  
And much more

I also recently added weighted tables which allows you to get weighted randoms very easily.

Please have a look at [GitHub - czuger/hazard: A very simple dice library for ruby](https://github.com/czuger/hazard)

I’m interested in any comments or improvements suggestions.
