dice_basic.lua
dice = require('dice')
math.randomseed(os.time())
single_die = dice:new(6) die_result = single_die:roll()
monopoly_dice = dice:new('2d6')
monopoly_turn = monopoly_dice:roll()
D&D_dice = dice:new('1d20') roll_to_hit = D&D_dice:roll()
risk_attackers_dice = dice:new('(1d6)x3')
risk_defenders_dice = dice:new('(1d6)x2')
attack_1, attack_2, attack_3 = risk_attackers_dice:roll()
defend_1, defend_2 = risk_defenders_dice:roll()
attackers_result = { risk_attackers_dice:roll() }
defenders_result = { risk_defenders_dice:roll() }
die_result = dice.roll(6)
monopoly_turn = dice.roll(6) + dice.roll(6)
roll_to_hit = dice.roll(20)
attack_1, attack_2, attack_3 = dice.roll(6), dice.roll(6), dice.roll(6)
defend_1, defend_2 = dice.roll(6), dice.roll(6)
die_result = dice.roll('1d6')
monopoly_turn = dice.roll('2d6')
roll_to_hit = dice.roll('1d20')
attack_1, attack_2, attack_3 = dice.roll('(1d6)x3')
defend_1, defend_2 = dice.roll('(1d6)x2')