Stupid command-line utility to generate a random bowling game
Install Rust, then build the program using:
cargo build
Generate a random bowling game
Usage: bowl [OPTIONS] [GENERATOR]
Arguments:
[GENERATOR] Generator to use for the frames [default: dice]
Options:
--ascii Output ASCII-only text instead of ANSI symbols
-h, --help Print help
Generator Types:
dice
- Generates frames based on the Bowling Dice Gameuniform
- First roll picks a uniform random number between 0 and 10. Second roll picks a uniform random number between 0 and the first roll.
bowl
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│3|4│3│/│5│/│5│/│5|2│3|3│5|2│2|2│4|5│4│3│ │
│ └─┤ └─┤ └─┤ └─┤ └─┤ └─┤ └─┤ └─┤ └─┤ └─┴─┤
│ 7│ 22│ 37│ 52│ 59│ 65│ 72│ 76│ 85│ 92│
└───┴───┴───┴───┴───┴───┴───┴───┴───┴─────┘
bowl --ascii
___________________________________________
|3|5|X| |6|1|3|/|2|3|4|3|X| |X| |X| |X|X|5|
| '-| '-| '-| '-| '-| '-| '-| '-| '-| '---|
| 8| 25| 32| 44| 49| 56| 86|116|146| 171|
|___|___|___|___|___|___|___|___|___|_____|
It sounded fun to have a command-line program that could bowl for you.