No description
| .gitignore | ||
| build.sh | ||
| dice-roller.upx | ||
| go.mod | ||
| go.sum | ||
| LICENCE | ||
| main.go | ||
| README.md | ||
Dead simple dice-rolling application
Just a small CLI app I wrote in Go for fun, for my own use.
Caution
This is the first thing I wrote in Go, I know the code is trash.
It uses Random.org, so if you wanna run it yourself, you need to create a file that's called apikey with, well, your Random.org API key and put it in the root/next to the binary.
Build script for a smaller binary (requires UPX to be installed)
./build.sh
Instructions of use
Run it in the terminal like this
Important
Don't forget your
apikeyfile
./dice-roller
Format your dice rolls like this:
ndp+qar
e.g. d10, 2d20, 2d12-5, 10d6a3, or 10d6-1a4 etc
| option | |
|---|---|
n |
Number of dice (optional) |
p |
Type of dice |
| optional parameters | |
| first modifier | |
+ |
The type of modifier, can only be - or + if second modifier is used |
q |
The modifier number |
| second modifier | |
a |
The type of modifier, can only be a or b if used |
r |
The second modifier number |
Modifiers:
| modifier | |
|---|---|
+ |
Add a constant number to roll |
- |
Subtract a constant number from roll |
a |
Show all dice which rolled the modifier number and above |
b |
Show all dice which rolled the modifier number and below |
Other commands
| command | |
|---|---|
r or [enter] |
for repeat last |
r[n] |
where n is a specific roll to repeat |
q |
to quit |