Something went wrong. Try again.
Simple algebraic dice notation parser for Gleam
Something went wrong. Try again.
Gleam 69%
18%
Nix 13%
Commits 17
update deps
Signed-off-by: Naomi Roberts <mia@naomieow.xyz>
add ci
Signed-off-by: Naomi Roberts <mia@naomieow.xyz>
add nix flake
Signed-off-by: Naomi Roberts <mia@naomieow.xyz>
Update gleam.toml
Signed-off-by: Naomi Roberts <mia@naomieow.xyz>
README.md
Diced #
Simple algebraic dice notation parser for Gleam
gleam add diced
import diced
pub fn main() {
echo diced.parse("1d6")
// Ok(diced.Basic(1, 6, []))
echo diced.parse("5d20kh2kl2")
// Ok(diced.Basic(5, 20, [diced.KeepHighest(2), diced.KeepLowest(2)]))
echo diced.parse("1")
// Ok(diced.Number(1, []))
echo diced.parse("4dF")
// Ok(diced.Fate(4, []))
}
Further documentation can be found at https://hexdocs.pm/diced.
Development #
gleam run # Run the project
gleam test # Run the tests