Swiftpack.co - Samasaur1/DiceKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Samasaur1.
Samasaur1/DiceKit v0.26.0
A Swift module for simulating dice both real and unreal
⭐️ 4
🕓 1 year ago
.package(url: "https://github.com/Samasaur1/DiceKit.git", from: "v0.26.0")

DiceKit tests

A Swift framework for simulating dice both real and unreal.


Documentation: https://samasaur1.github.io/DiceKit/

Swift Version Latest DiceKit version
Below Swift 4 Not supported
Swift 4.0.x v0.15.0
Swift 4.1.x v0.15.0
Swift 4.2.x Latest version
Swift 5.0.x Latest version
Swift 5.1.x Latest version
Swift 5.2.x Latest version
Swift 5.3.x Latest version
Swift 5.4.x Latest version
Swift 5.5.x Latest version
Swift 5.6.x Latest version
Swift 5.7.x Latest version

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

GitHub

link
Stars: 4
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Dependencies

Release Notes

Version 0.26.0: Fix Automatic Deployment
1 year ago

Changed

  • Removed draft marker from automatic releases

Fixed

  • Various required cleanup tasks due to the deploy scripts not working imemdiately

See changelog See docs

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics