module Rollable::FixedValue

Overview

Allows to create a die with a fixed value. The die will only gives this value everytime. (.min, .max, .test, .average)

This is equivalent to

Die.new(n..n)              # => FixedValue.new_die n
Dice.new(1, Die.new(n..n)) # => FixedValue.new_dice n

Defined in:

rollable/fixed_value.cr

Class Method Summary

Class Method Detail

def self.new_dice(fixed : Int32) #

Return a Dice with only one face.


[View source]
def self.new_die(value : Int32) #

Return a Die with only one face.


[View source]