log dice rolls
This commit is contained in:
parent
7dbe30a411
commit
826f34e866
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue