Module:Dice/Compare

local DiceCompare = {} local Dice = require'Module:Dice'

function DiceCompare.compare(frame) local comparison, why = Dice.compare(frame.args.dice_a, frame.args.dice_b) local which

if comparison > 0 then which = frame.args.dice_a elseif comparison < 0 then which = frame.args.dice_b else which = '' end

return frame:expandTemplate{ title = 'CompareDice/Format',

args = { which = which, why = why, },   } end

return DiceCompare