https://github.com/fireisgood/dice-dice-generator
Generates a game of Dice Dice—a small-scale gambling game simulation
https://github.com/fireisgood/dice-dice-generator
Last synced: about 1 year ago
JSON representation
Generates a game of Dice Dice—a small-scale gambling game simulation
- Host: GitHub
- URL: https://github.com/fireisgood/dice-dice-generator
- Owner: FireIsGood
- License: mit
- Created: 2023-12-17T11:54:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-22T02:05:05.000Z (over 2 years ago)
- Last Synced: 2025-02-18T01:43:03.527Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dice Dice Generator
A Dice Dice generator written in Rust.
Dice Dice is a game I made up to simulate a miniature round of gambling. It is
a series of numbered answers that are covered by spoilers. Users start with a
certain number of points and may then click as many answers as they want.
Answers may be positive or negative towards score and the player counts the
score on their own.
It's just a random text game I made up on the spot since I was running out of
ideas for Minesweeper.
```markdown
Config name: all good
## Dice Dice (Day 1984)
*Test Edition*
Unspoiler any number of the following prompts, when you want to stop, record your number. You may then check the rest. (please don't post the answers)
You start with 100 points. Calculate on your points with what is written.
:one: ||`add 5 `||
:two: ||`subtract 10 `||
:three: ||`spin in a circle `||
```
## Installation
Download the [latest release binary](https://github.com/FireIsGood/minesweeper-generator/releases) or build from the source.
To build from the source, clone the repo and run the cargo command:
```bash
cargo build --release
```
The binary will be created in `./target/release`.
## Usage
The binary requires a configuration [TOML](https://toml.io/en/) file in the
following format:
```toml
# Name of the config
name = "all good"
# Optional minimum length to pad to
min_length = 24
# Optional rules to display
rules = """
## Dice Dice (Day 1984)
*Test Edition*
Unspoiler any number of the following prompts, when you want to stop, record your number. You may then check the rest. (please don't post the answers)
You start with 100 points. Calculate on your points with what is written."""
# Vector of tables of answers
answers = [
# Answers have an optional number
{ operation = "add", number = 5 },
{ operation = "subtract", number = 10 },
{ operation = "spin in a circle" },
]
```
Once you have a configuration, run the binary and supply the location of your
config file.
```bash
dice-dice-generator ./path/to/config.toml
```
## Limitations
Discord only allows for 99 emotes to be rendered in a message, so the numbers
in the message might get cut off at a certain length.
## Contributing
This project is a generator for a game that I made up and the configuration
file is harder to write than just doing the whole thing by hand. If you really
want to contribute regardless of that, feel free to make issues or pull
requests.
## License
[MIT](https://choosealicense.com/licenses/mit/)