Skip to content

Releases: Samasaur1/DiceKit

Version 0.19.0: No extraneous dependencies

26 Dec 19:56
v0.19.0
b6a47f6
Compare
Choose a tag to compare

Added

  • Scripts to hide/unhide dev dependencies

Changed

  • Documentation will no longer force-push; instead it will update
  • Safety checks were removed from the release script

Fixed

  • Dev dependencies, such as Danger, are now only included, downloaded, and built on CI

See changelog
See docs

Version 0.18.1: Release script & documentation

22 Aug 17:28
v0.18.1
b4f6f38
Compare
Choose a tag to compare

Fixed

  • The release script has been fixed (closes #67)
  • The automatic documentation has been fixed

See changelog
See docs

Version 0.18.0: Structification, Describable, and internal changes

04 Aug 23:03
v0.18.0
f235c6c
Compare
Choose a tag to compare

Added

  • Add release.py and updateVersion.py scripts
  • Add Danger integration
    • Checks that PRs to master have Version X.Y.Z: $DESCRIPTION as their title
    • Checks that there are changes to the CHANGELOG
    • Checks that the latest date is the date that the PR is merged (technically the date of the last Travis build)
    • Checks that there are changes in tests files when source files are changed
    • Checks that swift test --generate-linuxmain is run when new tests are written
  • Ensure that all structs conform to a new type, Describable (CustomStringConvertible & CustomDebugStringConvertible)

Changed

  • All classes were converted to structs
  • Moves everything to one pull request template so that it comes up by default

Fixed

  • The image on the generated documentation is no longer cut off
  • Ensures that a pull request template is applied

Removed

Update .travis.yml in case https://swiftenv.fuller.li/install.sh is down/has no SSL certificate

See changelog
See docs

Version 0.17.0: Chance and Probabilities

29 Jul 17:42
v0.17.0
eea8cb0
Compare
Choose a tag to compare

Added

  • New feature guidelines
  • Issue and pull request templates
  • Rollable
    • chance(of:_:)
    • probabilities — property of type Chances
    • chance(of:) for rolling in ranges
  • CustomDie
    • chance(of:) for a specific possibility
  • Chance
    • gcd(_:_:) and lcm(_:_:)
    • +, -, and += operators
    • normalized — proportionally scales every Chance until the sum is 1

Changed

  • Chances
    • No longer has entries in the dictionary for Rolls where the Chance is 0

Fixed

  • Latest compatible version links to refer to releases rather than the tree at the specified tag
  • Rollable
    • roll(times:_:) would crash when called like so: roll(times: 1, .dropOutsides)

See changelog
See docs

Version 0.16.1: Update Swift 5 CI to Xcode 10.2

25 Jun 18:45
v0.16.1
70636a3
Compare
Choose a tag to compare

Here's what's new:

  • Testing on Swift 5.0.1 and Xcode 10.2
  • Fixed auto-deploying docs

See changelog
See docs

Version 0.16.0: Custom dice, weighted dice, a changelog, errors, and Swift 4.2+ only

24 Jun 18:29
v0.16.0
110bf4c
Compare
Choose a tag to compare

Here's what's new:

  • A changelog (closes #14)
  • Custom dice (closes #21)
  • Weighted dice (closes #22)
  • Updates the minimum Swift version from 4.0 to 4.2 and removes any code that is no longer needed
  • Adds an Error enum
  • Converts failable initializers to throwing initializers that use the new Error enum
  • Adds more documentation
  • Moves roll(times:_:) to an extension of the Rollable protocol so that it has a default implementation
  • Adds Hound and SwiftLint config

See changelog
See docs

Version 0.15.0: Add averageResult and canReach functions

25 Jun 18:50
v0.15.0
44d8207
Compare
Choose a tag to compare

This is the last version to support Swift 4.0-4.0.3 and Swift 4.1-4.1.3

Here's what's new:

See changelog
See docs

Version 0.1.0

01 Sep 21:00
v0.1.0
e0028f1
Compare
Choose a tag to compare
Version 0.1.0 Pre-release
Pre-release

The initial release of DiceKit!

Features:

  • Die
    • Initialization
      • Create with number of sides: let d = Die(sides: 6)! (it's a failable initializer)
      • Create from static property: let d = Die.d6
      • Create from other die: let d = Die(copyOf: otherDie) or let d = otherDie.copy()
    • Rollability
      • Get a random integer from 1 to the number of sides, inclusive: let result = die.roll()
    • Swift Standard Library Protocol Conformance
      • Equatable
        • Die.d6 == Die(sides: 6)! // true
        • Die.d4 != Die.d8 // true
      • Comparable
        • Die.d6 > Die.d4 // true
        • Die.d10 <= Die.d10 // true
      • Hashable
        • Die.d6.hashValue // 6
        • Die.d4.hashValue // 4
        • Faster/usable at all in some collection types.
      • CustomStringConvertable, CustomDebugStringConvertable
        • Die.d6.description // A six-sided die.
        • Die.d6.debugDescription // 1d6
  • Dice
    • Initialization
      • Initializers
        • Create with some given dice (variadic - comma-separated): let dice = Dice(Die.d4, Die.d6, Die.d6)
        • Create with some given dice (array): let dice = Dice([Die.d4, Die.d6, Die.d6])
        • Create with dice and modifier (variadic/array): let dice = Dice(Die.d6, withModifier: 5) or let dice = Dice([Die.d4, Die.d8, Die.d20], withModifier: 5)
        • Create from other Dice: let dice = Dice(copyOf: otherDice) or let dice = otherDice.copy()
      • Operators
        • Die + Die: let dice = Die.d6 + Die.d4 (equivalent to let dice = Dice(Die.d6, Die.d4))
        • Die + Int: let dice = Die.d6 + 5 (equivalent to let dice = Dice(Die.d6, withModifier: 5))
        • Dice + Dice: let dice = Dice(Die.d6) + Dice(Die.d4, withModifier: 3) (equivalent to let dice = Dice(Die.d6, Die.d4, withModifier: 3))
        • Dice + Die: let dice = Dice(Die.d4, withModifier: 3) + Die.d6 (equivalent to let dice = Dice(Die.d6, Die.d4, withModifier: 3))
        • Dice + Int: let dice = Dice(Die.d4, Die.d6) + 3 (equivalent to let dice = Dice(Die.d6, Die.d4, withModifier: 3))
    • Rollability
      • Roll and add all contained dice and the modifier: let result = dice.roll()
    • Swift Standard Library Protocol Conformance
  • Roll
    • Initialization: let roll = Roll(value: 5)
    • Equation: Roll(value: 5) != Roll(value: 3)
    • Comparison: Roll(value: 4) > Roll(value: 2)
    • Hashable
    • Description: Roll(value: 3).description // A roll with a value of 3
    • Debug Description: Roll(value: 3).debugDescription // roll(value: 3)
    • Basic operators
    • Static zero property: let roll = Roll.zero
  • Rollable
    • Defines something that is rollable.
    • Rollability: let result = rollable.roll()
    • Implementations:
      • let r: Rollable = Die.d6
      • let r: Rollable = Dice(Die.d6)