https://github.com/pknull/rpg-flip
A flipper thing
https://github.com/pknull/rpg-flip
Last synced: 5 months ago
JSON representation
A flipper thing
- Host: GitHub
- URL: https://github.com/pknull/rpg-flip
- Owner: pknull
- Created: 2018-08-01T03:05:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2026-01-17T02:00:19.000Z (5 months ago)
- Last Synced: 2026-01-17T14:33:18.374Z (5 months ago)
- Language: Python
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rpg-flip
Simple utilities for randomly selecting from a predefined list of sides. The
package exposes a `Tosser` class that can operate on any object which defines a
`SIDES` attribute. A couple of example casts are provided in `flipper.Casts`.
> This project is partially managed by [Asha](https://github.com/pknull/asha), a Claude Code framework.
## Usage
```python
from flipper import Coin, Tosser
t = Tosser(Coin)
print(t.toss()) # e.g. ['Heads']
print(t.toss(ntoss=2))
print(t.toss(ntoss=2, unique=True))
```
## Development
Install dependencies (none are required for runtime) and run tests with `pytest`:
```bash
pip install -e .
pytest
```