Class: BCDice::GameSystem::KizunaBullet::RollTwiceRandomizerTable

Inherits:
Object
  • Object
show all
Defined in:
lib/bcdice/game_system/kizuna_bullet/tables.rb

Instance Method Summary collapse

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