Compare commits

..

2 Commits

Author SHA1 Message Date
6b8dd1a645 dos2unix dice/* 2019-06-22 11:45:09 -05:00
649a148209 don't assert on trials if they aren't provided 2019-06-22 11:43:30 -05:00
3 changed files with 308 additions and 307 deletions

View File

@ -64,7 +64,8 @@ class DiceRoller(object):
up to a semicolon or end of line).
"""
rolls = mods[0][0][1] if mods[0][0][1] else 1
assert trials <= 10, "Too many rolls (max: 10)."
if trials:
assert trials <= 10, "Too many rolls (max: 10)."
assert rolls <= 50, "Too many dice (max: 50) in roll."
output = ""