Class: BCDice::GameSystem::KizunaBullet::RollTwiceRandomizerTable
- Inherits:
-
Object
- Object
- BCDice::GameSystem::KizunaBullet::RollTwiceRandomizerTable
- Defined in:
- lib/bcdice/game_system/kizuna_bullet/tables.rb
Instance Method Summary collapse
-
#initialize(locale:, a_table:, b_table:) ⇒ RollTwiceRandomizerTable
constructor
A new instance of RollTwiceRandomizerTable.
- #roll(randomizer) ⇒ Object
Constructor Details
#initialize(locale:, a_table:, b_table:) ⇒ RollTwiceRandomizerTable
Returns a new instance of RollTwiceRandomizerTable.
7 8 9 10 11 |
# File 'lib/bcdice/game_system/kizuna_bullet/tables.rb', line 7 def initialize(locale:, a_table:, b_table:) @locale = locale @a_table = a_table @b_table = b_table end |
Instance Method Details
#roll(randomizer) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bcdice/game_system/kizuna_bullet/tables.rb', line 13 def roll(randomizer) results = [] result_a = @a_table.roll(randomizer).to_s results.push(result_a) result_b = @b_table.roll(randomizer).to_s results.push(result_b) return results.join("\n") end |