Class: BCDice::GameSystem::StellarLife::StellarLifeD10Table
- Inherits:
-
DiceTable::Table
- Object
- DiceTable::Table
- BCDice::GameSystem::StellarLife::StellarLifeD10Table
- Defined in:
- lib/bcdice/game_system/StellarLife.rb
Direct Known Subclasses
Defined Under Namespace
Classes: RollResult
Instance Method Summary collapse
- #choice(value) ⇒ Object
-
#initialize(name, items) ⇒ StellarLifeD10Table
constructor
A new instance of StellarLifeD10Table.
Methods inherited from DiceTable::Table
Constructor Details
#initialize(name, items) ⇒ StellarLifeD10Table
Returns a new instance of StellarLifeD10Table.
102 103 104 |
# File 'lib/bcdice/game_system/StellarLife.rb', line 102 def initialize(name, items) super(name, '1D10', items) end |
Instance Method Details
#choice(value) ⇒ Object
106 107 108 109 |
# File 'lib/bcdice/game_system/StellarLife.rb', line 106 def choice(value) index = value - @times return RollResult.new(@name, value, @items[index]) end |