A Swift library to simulate dice rolls, as in board games or pen-and-paper role playing games. Available as a framework for iOS and OSX, Carthage compatible.
do {
let roll = try DiceExpression("3d6+20").roll()
print("Result: \(roll.result)")
} catch {
print("Invalid expression: \(error)")
}