Module: BCDice::CommonCommand::BarabaraDice

Defined in:
lib/bcdice/common_command/barabara_dice.rb,
lib/bcdice/common_command/barabara_dice/node.rb,
lib/bcdice/common_command/barabara_dice/parser.rb,
lib/bcdice/common_command/barabara_dice/result.rb

Defined Under Namespace

Modules: Node Classes: Parser, Result

Constant Summary collapse

PREFIX_PATTERN =
/\d+B\d+/.freeze

Class Method Summary collapse

Class Method Details

.eval(command, game_system, randomizer) ⇒ Object



11
12
13
14
# File 'lib/bcdice/common_command/barabara_dice.rb', line 11

def eval(command, game_system, randomizer)
  cmd = Parser.parse(command)
  cmd&.eval(game_system, randomizer)
end