Class: BCDice::GameSystem::TwilightGunsmoke::TGTable

Inherits:
DiceTable::D66RangeTable show all
Defined in:
lib/bcdice/game_system/TwilightGunsmoke.rb

Overview

オプニング, エンディング, 情報収集チャート用のテーブルD66を振って決定する1項目あたり出目3つに対応する

Constant Summary collapse

RANGE =

1項目あたり3個

[11..13, 14..16, 21..23, 24..26, 31..33, 34..36, 41..43, 44..46, 51..53, 54..56, 61..63, 64..66,].freeze

Instance Method Summary collapse

Methods inherited from DiceTable::D66RangeTable

#roll

Constructor Details

#initialize(name, items) ⇒ TGTable

Returns a new instance of TGTable.

Parameters:

  • name (String)
  • items (Array<String>)


104
105
106
107
108
109
110
111
112
# File 'lib/bcdice/game_system/TwilightGunsmoke.rb', line 104

def initialize(name, items)
  if items.size != RANGE.size
    raise UnexpectedTableSize.new(name, items.size)
  end

  items_with_range = RANGE.zip(items)

  super(name, items_with_range)
end