Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

loaded_dice

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loaded_dice

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

SYNOPSIS

die = LoadedDie.new(1,1,2,1,1,1) die.roll # => one of {0,1,2,3,4,5}, with 2 being more likely.

And just for kicks, here's a 20 sided non loaded die:

die = LoadedDie.new(*([1] * 20)) die.roll

DESCRIPTION

Roll the dice in your favor! A loaded die implementation that allows simulation of dice with any number of faces. Applications might include games, but also simulations, where events have discrete probabilities and are mutually exclusive.

FAQs

Package last updated on 26 Nov 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc