Dice is a Golang library and CLI solution for your dice-rolling needs. The Go source is split into two main parts:
- Package
dice
implements virtualized standard polyhedral and specialty game dice. The dice roll calculations are intended to be cryptographically pseudo-random through use ofcrypto/rand
by default, but the entropy source used by the package is configurable. - Package
main
incmd/dice
is a CLI utility for dice rolling and expression evaluation.
You need Go installed. To fetch just the main CLI, build it, and place it in your GOPATH:
go get -u github.com/travis-g/dice/cmd/dice
To fetch the source and dependencies and place everything in your GOPATH:
go get -u github.com/travis-g/dice/...
The actual main
package is defined in cmd/dice
. To test everything and build the CLI:
make build
See the Makefile
for more.
-
Alias
dice eval
asroll
in your shell if you get sick of specifying the subcommand.alias roll="dice eval"