An example of a package developed with pipenv, built with build using setuptools, uploaded to PyPI using twine, and distributed via pip.
Project description
🎰 NimbusCasino
nimbuscasino is a lightweight and testable Python package with four classic chance-based mini-games:
- Rock-Paper-Scissors
- Coin Flip
- Roulette (Red/Black)
- Slots (3×3)
All game functions are pure (no input/print, no global state) and return structured results, so you can plug them into chatbots, simulations, or your own program.
⚠️ This package is for entertainment and educational use only — no real gambling or monetary transactions are involved.
Team Members
| Name | GitHub Profile |
|---|---|
| Asim | @asimd0 |
| Matt | @m9membreno |
| Tup | @treejitsu |
| Elia | @YilinWu1028 |
| Mojin | @Mojin-Yuan |
Installation
PyPi page
https://pypi.org/project/nimbuscasino/
1) Install pipenv (if needed)
pip install pipenv
2) Create/activate a virtual environment
pipenv shell
3) Install nimbuscasino from PyPi
pipenv install nimbuscasino
Verify your installation in python:
from nimbuscasino.rps import rps
print(rps("rock"))
Usage:
Each game function returns a dictionary containing details of the outcome.
You control any printing, UI, or balance-handling.
Note: Each function accepts an optional pseudo-random generator (rng) to support deterministic testing. You can ignore this in normal gameplay.
1) Rock-Paper-Scissors — rps(player, bet=1, rng=None)
Arguments
| Name | Type | Description |
|---|---|---|
player |
"rock", "paper", or "scissors" |
Your selection |
bet |
number > 0 | Wager amount |
rng |
optional | Must support .choice(seq) if provided |
Return Example
{
"game": "rps",
"player": "rock",
"computer": "scissors",
"result": "win" | "lose" | "tie",
"payout": 5
}
Example Usage
from nimbuscasino.rps import rps
res = rps("rock", bet=5)
print(res)
2) Coin Flip — coinflip(guess, bet=1, rng=None, bias=0.5)
Arguments
| Name | Type | Description |
|---|---|---|
guess |
"heads" or "tails" |
Your call |
bet |
positive integer | Wager |
rng |
optional | Must support .random() → float in [0,1) |
bias |
float (0.0–1.0) | Probability of heads |
Return Example
{
"game": "coinflip",
"guess": "heads",
"flip": "heads" | "tails",
"win": True | False,
"payout": 1 | -1 | ...,
"prob_heads": 0.5
}
Example Usage
from nimbuscasino.coinflip import coinflip
res = coinflip("heads", bet=2)
print(res)
3) Roulette (Red/Black) — roulette_color(color, bet=1, rng=None)
Arguments
| Name | Type | Description |
|---|---|---|
color |
"red" or "black" |
Color to bet on |
bet |
number > 0 | Wager |
rng |
optional | Must support .choice(seq) |
Return Example
{
"result": True | False,
"spin": "red" | "black" | "green",
"payout": 10 | -10 | ...
}
Example Usage
from nimbuscasino.roulette import roulette_color
res = roulette_color("red", bet=10)
print(res)
4) Slots — spin_slots(bet=1, rng=None, symbols=None, weights=None, paytable=None, rows=3, cols=3)
Arguments
| Name | Description |
|---|---|
bet |
Amount wagered per spin |
rng |
Optional random source supporting .choices() |
symbols, weights, paytable |
Optional custom reel configuration |
rows, cols |
Dimensions of slot grid (Default: 3×3) |
Return Example
{
"game": "slots",
"grid": [["🍋","🔔","🍋"], ["🍋","⭐","🍋"], ["🍒","🔔","🍋"]],
"lines": { "middle": {"symbol":"🍋","count":3,"payout":6}, ... },
"total_payout": 6
}
Example Usage
from nimbuscasino.slots import spin_slots
res = spin_slots(bet=3)
print(res)
Interactive Example Program
A demo is included for trying all four games:
File: example.py
https://github.com/swe-students-fall2025/3-python-package-team_nimbus/blob/pipfile-experiment/example.py
Run it:
python example.py
Contributing (Local Development Setup)
# Clone repository
git clone https://github.com/swe-students-fall2025/3-python-package-team_nimbus.git
cd 3-python-package-team_nimbus
# Create / activate virtual environment
pipenv shell
# Install development dependencies
pipenv install --dev
# Install package in editable mode
pip install -e .
# Run test suite
pytest
# Build distributable packages
python -m build
(Optional) Upload Build to TestPyPI
twine upload --repository testpypi dist/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nimbuscasino-0.1.2.tar.gz.
File metadata
- Download URL: nimbuscasino-0.1.2.tar.gz
- Upload date:
- Size: 47.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1f8aea4457b6880d20034f99bb2b1ccf197b2663ccdf2e71620da7d491923b6
|
|
| MD5 |
4c241457ef954d33c32c57e25bf979c8
|
|
| BLAKE2b-256 |
66ed8d0a7f138604c983d7546b453cf3aa20100ec773393d18e470ab4964022f
|
File details
Details for the file nimbuscasino-0.1.2-py3-none-any.whl.
File metadata
- Download URL: nimbuscasino-0.1.2-py3-none-any.whl
- Upload date:
- Size: 33.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
debb55e065ff8dec45f4d18a9088c972f4ca635f4b5e329535d52cc33f8bac16
|
|
| MD5 |
8525757e3898b246f465769f61c5e172
|
|
| BLAKE2b-256 |
15ed8410f54479d4b377363139b6efa953e39f87a1d6a4410a1c898728561d79
|