diff --git a/README.md b/README.md index 4986aa2..f58e41b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Diced -Simple algraeic dice notation parser for Gleam +Simple algebraic dice notation parser for Gleam [![Package Version](https://img.shields.io/hexpm/v/diced)](https://hex.pm/packages/diced) [![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/diced/) @@ -11,8 +11,17 @@ gleam add diced import diced pub fn main() { - let dice = diced.dice_from_string("2d20kh") - // Ok(diced.Dice(2, 20, diced.Advantage)) + echo diced.parse("1d6") + // Ok(diced.Basic(1, 6, [])) + + echo diced.parse("5d20kh2kl2") + // Ok(diced.Basic(2, 20, [diced.KeepHighest(2), diced.KeepLowest(2)])) + + echo diced.parse("1") + // Ok(diced.Number(1, [])) + + echo diced.parse("4dF") + // Ok(diced.Fate(4, [])) } ```