Swift framework for expressing and evaluating dice notation (e.g., d20, 4d6+4, 3d8×10+2), which is commonly used in tabletop role-playing games.
14
stars
1
forks
source link
Handle constants in expressions properly #46
Closed
brentleyjones closed 9 years ago
Per https://github.com/TabletopAssistant/DiceKit/pull/44#issuecomment-124874425 the way we are handling constants, by making
Int
itself anExpressionType
, is problematic. We need a new typeConstant
which takesInt
(or is generic and takes a whole class of constants) and conforms toExpressionType
.