Class: BCDice::GameSystem::KizunaBullet::Roll4TimesRandomizerTable
- Inherits:
-
Object
- Object
- BCDice::GameSystem::KizunaBullet::Roll4TimesRandomizerTable
- Defined in:
- lib/bcdice/game_system/kizuna_bullet/tables.rb
Instance Method Summary collapse
-
#initialize(locale:, a_table:, b_table:, c_table:, d_table:) ⇒ Roll4TimesRandomizerTable
constructor
A new instance of Roll4TimesRandomizerTable.
- #roll(randomizer) ⇒ Object
Constructor Details
#initialize(locale:, a_table:, b_table:, c_table:, d_table:) ⇒ Roll4TimesRandomizerTable
Returns a new instance of Roll4TimesRandomizerTable.
27 28 29 30 31 32 33 |
# File 'lib/bcdice/game_system/kizuna_bullet/tables.rb', line 27 def initialize(locale:, a_table:, b_table:, c_table:, d_table:) @locale = locale @a_table = a_table @b_table = b_table @c_table = c_table @d_table = d_table end |
Instance Method Details
#roll(randomizer) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/bcdice/game_system/kizuna_bullet/tables.rb', line 35 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) result_c = @c_table.roll(randomizer).to_s results.push(result_c) result_d = @d_table.roll(randomizer).to_s results.push(result_d) return results.join("\n") end |