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.
280 281 282 283 |
# File 'lib/bcdice/game_system/FilledWith.rb', line 280 def initialize(name, rows) @name = name @rows = rows end |
Instance Method Details
#roll(randomizer, difficality) ⇒ Object
285 286 287 288 289 290 |
# File 'lib/bcdice/game_system/FilledWith.rb', line 285 def roll(randomizer, difficality) value = randomizer.roll_d66(D66SortType::NO_SORT) chosen = @rows[value] "#{@name}<#{difficality.name}>(#{value}):#{chosen.format(difficality)}" end |