Dice is a Golang library and CLI solution for your dice-rolling needs. The Go source is split into two main parts:
- Package
diceimplements virtualized standard polyhedral and specialty game dice. The dice roll calculations are intended to be cryptographically pseudo-random through use ofcrypto/randby default, but the entropy source used by the package is configurable. - Package
mainincmd/diceis 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/diceTo 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 buildSee the Makefile for more.
-
Alias
dice evalasrollin your shell if you get sick of specifying the subcommand.alias roll="dice eval"