Skip to content

travis-g/dice

Repository files navigation

Dice

GoDoc Go Report Card

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 of crypto/rand by default, but the entropy source used by the package is configurable.
  • Package main in cmd/dice is a CLI utility for dice rolling and expression evaluation.

Install

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

Build

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.

Tips

  • Alias dice eval as roll in your shell if you get sick of specifying the subcommand.

    alias roll="dice eval"

About

Golang library and CLI for rolling dice

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published