%%VERSION%%
Odds is an OCaml library for rolling dice. It features deterministic dice rolls and it uses effects in order to leave all PRNG choices to the binary/main rather than embedding it in the library code.
Odds can be installed with opam:
opam install odds
-
Odds.Dicecontains basic definitions for theRolleffect and for basic dice algebra operators:dandd-k. -
The parser (
parser.mly) parses the string and emits theRolleffects as needed. -
rollis an implementation of a simple dice-roller using theOddslibrary and parser. -
tests/parser.mltests the parser. It uses a Shallow effect handler to maintain a state of what rolls it expects to see and what pre-rolled values are used.
To generate the documentation, use dune build @doc
To consult online documentation, visit https://raphael-proust.github.io/code/odds/index.html