目录
目录README.md

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
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号