Class: BCDice::GameSystem::FilledWith::D66Table
- Inherits:
-
Object
- Object
- BCDice::GameSystem::FilledWith::D66Table
- Defined in:
- lib/bcdice/game_system/FilledWith.rb
Instance Method Summary collapse
-
#initialize(name, rows) ⇒ D66Table
constructor
A new instance of D66Table.
- #roll(randomizer, difficality) ⇒ Object
Constructor Details
#initialize(name, rows) ⇒ D66Table
Returns a new instance of D66Table.
284 285 286 287 |
# File 'lib/bcdice/game_system/FilledWith.rb', line 284 def initialize(name, rows) @name = name @rows = rows end |
Instance Method Details
#roll(randomizer, difficality) ⇒ Object
289 290 291 292 293 294 |
# File 'lib/bcdice/game_system/FilledWith.rb', line 289 def roll(randomizer, difficality) value = randomizer.roll_d66(D66SortType::NO_SORT) chosen = @rows[value] "#{@name}<#{difficality.name}>(#{value}):#{chosen.format(difficality)}" end |