class ParaDice::PolyBag

A ParaDice bag that has all of the standard dice: d6, d10, d10, and that you can add more like d33

Constants

DEFAULT_DICE

contains all of the dice to start the bag with

DEFAULT_READERS

the result stack that Bag will pass by default to cups.

Public Class Methods

get(rng = nil) click to toggle source

generate a new poly bag with optional rng @param [nil, Random, rand] random number generator to pass to all cups

(which will in turn pass it to each)

@return [PolyBag]

# File lib/para_dice/poly_bag.rb, line 19
def self.get(rng = nil)
  a = ParaDice::Bag.new(name:            'Poly Dice',
                        rng:             rng,
                        default_readers: DEFAULT_READERS)

  DEFAULT_DICE.each do |num|
    die = NumberedDie.get(num)
    a.add_die(die)
  end
  return a
end