Contents

samasaur1/dicekit

A Swift framework for simulating dice both real and unreal.

Quickstart

Add DiceKit to your project using the Swift Package Manager

Roll some dice

import DiceKit

let myDie = Die.d6
let result = myDie.roll()

let myAbilityScore = try! myDie.roll(times: 4, .dropLowest)

let damageRoll = Dice("3d6 + 5")
let probabilityDistribution = damageRoll.probabilities
let mightDoNoDamage = damageRoll.chance(of: ...0) != 0

Package Metadata

Repository: samasaur1/dicekit

Default branch: master

README: README.md