Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 481 Bytes

README.md

File metadata and controls

17 lines (11 loc) · 481 Bytes

DiceExpression Build Status

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.

Example usage

do {
	let roll = try DiceExpression("3d6+20").roll()
	print("Result: \(roll.result)")
} catch {
	print("Invalid expression: \(error)")
}