https://github.com/annekitsune/anne_dice
Simple zig dice roller
https://github.com/annekitsune/anne_dice
zig zig-package
Last synced: 10 months ago
JSON representation
Simple zig dice roller
- Host: GitHub
- URL: https://github.com/annekitsune/anne_dice
- Owner: AnneKitsune
- License: agpl-3.0
- Created: 2025-08-11T22:23:09.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-15T01:32:47.000Z (10 months ago)
- Last Synced: 2025-08-15T03:30:28.614Z (10 months ago)
- Topics: zig, zig-package
- Language: Zig
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zig simple dice library
A simple library to quickly do common dice rolls.
Usage (zig):
1. Add `anne_dice` to your module's imports.
2. `anne_dice.d2()`
3. Profit!
Usage (C):
1. Include `anne_dice.h`
2. Link against `anne_dice.a`
3. `d2()`
4. Profit!
### Available functions:
```
intRange(min: u32, max: u32) u32
d2() u32
d4() u32
d6() u32
/// Sums the value of `count` d6 rolls.
d6Count(count: u32) u32
d8() u32
d10() u32
d12() u32
d20() u32
d100() u32
/// See documentation in `src/root.zig`
challengeRoll(modifier: i32) ChallengeRollResult
```