TabletopAssistant / DiceKit

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.
Apache License 2.0
14 stars 1 forks source link

Handle constants in expressions properly #46

Closed brentleyjones closed 9 years ago

brentleyjones commented 9 years ago

Per https://github.com/TabletopAssistant/DiceKit/pull/44#issuecomment-124874425 the way we are handling constants, by making Int itself an ExpressionType, is problematic. We need a new type Constant which takes Int (or is generic and takes a whole class of constants) and conforms to ExpressionType.