log dice rolls

This commit is contained in:
Brian S. Stephan 2018-01-17 10:30:44 -06:00
parent 7dbe30a411
commit 826f34e866
1 changed files with 4 additions and 0 deletions

View File

@ -1,9 +1,12 @@
"""Functions for use in the dice module."""
import logging
import random
import ply.lex as lex
import ply.yacc as yacc
logger = logging.getLogger(__name__)
class DiceRoller(object):
@ -257,6 +260,7 @@ class DiceRoller(object):
dS: roll a S-sided die
+M: add M to the result (-M for subtraction) (optional)
"""
logger.info("rolling {0:s}".format(dicestr))
yacc.parse(dicestr)
return self.get_result()