First set of updates from the major "backendification" rewrite #1

Merged
bss merged 21 commits from backend-frameworkification into master 2019-10-11 09:00:37 -05:00
1 changed files with 2 additions and 6 deletions
Showing only changes of commit b917f78ca5 - Show all commits

View File

@ -93,12 +93,8 @@ class DiceRoller(object):
size = m[1]
if keep > dice or keep == 0:
keep = dice
if size < 1:
output = "# of sides for die is incorrect: %d" % size
return output
if dice < 1:
output = "# of dice is incorrect: %d" % dice
return output
assert size >= 1, f"Die must have at least one side."
assert dice >= 1, f"At least one die must be rolled."
res = self.roll_dice(keep, dice, size)
curr_str += "%d%s" % (res[0], res[1])
res = res[0]