Skip to main content

Balance of Power Chess - a CLI strategy card game (BoP) where chess flavor meets a 52-card deck.

Project description

Balance of Power Chess (bop)

"King is the father, Queen the mother, the two is the child — and the child grows into a King. So the cycle of power begins again."

Balance of Power Chess (BoP Chess, or just bop) is a two-player trick-taking card game that maps a 52-card deck onto chess pieces and a "balance of power" cycle in which even the smallest card can topple the King under the right conditions. This package is the free, open-source command-line implementation of the game by its designer, SilverSummitCo LLC, intended as a strategy sandbox for testing lines of play before they reach the kitchen-table or commercial versions.


Install

From PyPI (when published)

pipx install bop-chess          # recommended
# or
pip install --user bop-chess

After installation, the bop console script is on your $PATH:

bop

The PyPI package name is bop-chess (bop was taken). The bop console script command is unchanged — you still just type bop to play. See the publish runbook for the full release steps.

From source (development install)

git clone https://github.com/silversummitco/balance-of-power-chess.git
cd balance-of-power-chess/BalanceOfPowerGame
python3 -m venv .venv
.venv/bin/pip install -e .[dev]
.venv/bin/bop                      # or:  .venv/bin/python -m bop

Optional: desktop launcher (Linux)

bop --install-desktop

Writes a .desktop file under ~/.local/share/applications/ so the game shows up in your applications menu. macOS / Windows print a graceful message instead — launch the game from a terminal on those platforms.


Usage

bop                         # Play a Game to 64 cumulative Procession points.
bop --exhibition            # Play a single Match.
bop --difficulty easy|hard  # Set the AI strength up front.
bop --target-score N        # Custom target score (default 64).
bop --seed N                # Reproducible shuffle - same N gives the same deal.
bop --name LEE              # Skip the name/color/icon setup wizard.
bop --no-intro              # Skip the opening lore crawl.

bop --rules                 # Print the full canonical rules and exit.
bop --credits               # Author, license, tip-jar.
bop --leaderboard           # Show local stats (per-name win/loss tracking).
bop --install-desktop       # Add an applications-menu launcher (Linux).
bop --version
bop --help                  # Full command sitemap.

While playing, at any "Play number" prompt you can also type:

Token What it does
<number> Play the listed card with that number
h, help Show in-game help
r, rules Show the full rules without leaving the game
t, tricks Show the full Trick History played so far
q, quit Exit cleanly

Environment variables

Var Effect
NO_COLOR Disable all ANSI colors (per the no-color.org convention).
BOP_FORCE_COLOR Force colors on even when stdout isn't a TTY.
BOP_NO_STATS Skip leaderboard persistence for this run.
BOP_STATS_PATH Override the leaderboard file location.
BOP_NO_SOUND Silence the intro chime (terminal bell).

The game in 30 seconds

  • Chess flavor. King = K, Queen = Q, Bishop = A, Knight = J, Rook = 10. Cards 3-9 are pawns. The 2 is the special "en-passant pawn."
  • Two phases per match.
    • Battle Round — classic trick-taking. Each trick has a Board Card drawn from the deck which sets the round suit. Must follow suit if able. Higher suit beats lower suit; same suit, higher rank wins. Special plays: en passant (a declared 2 of same-or-higher suit beats a King) and castle (10 + K of the same suit played together, supreme within its suit).
    • Procession Round — the final battle. Captured face/10/2 cards from the Battle become each player's "power-card" hand. Players play their cards in their own ascending order (suit ladder ♣ → ♦ → ♠ → ♥). A standing card on the Battle Board stays until outranked. Any Queen entering the board (natural or a kept 2 played as a pseudo-Queen) wins the slot — the Stop Run rule.
  • Cycle of power. King beats Queen; Queen beats pseudo-Queen / 2; declared 2 beats King. Every card has a vulnerability.
  • Goal. First player to 64 cumulative Procession points wins. (One point per square on a chess board.)

The complete rules are bundled with the install — run bop --rules or read docs/rules.md.


Tip the designer

If you're enjoying the game and want to throw a coin to the author, the addresses are also listed under bop --credits:

  • BTC: bc1qc7fp9cjww0ju03v9lyekkce44wfr3zyt6rud6x
  • DOGE: DJDqBvbDjZfZTF3k4d2p7PfZbsJGfPTHKV

Contact: silversummitco@proton.me


Project layout

bop/                  ← installable Python package
├── card.py
├── deck.py
├── trick.py
├── battle_round.py
├── transition.py
├── procession.py
├── match.py
├── game.py
├── ai.py
├── stats.py          ← leaderboard persistence
├── install.py        ← desktop-launcher installer
├── cli.py            ← `bop` entry point
└── ui/
    ├── colors.py     ← ANSI palette + helpers
    ├── intro.py      ← Block-letter CHESS splash + rules
    ├── render.py     ← All card / table / frame rendering
    ├── prompts.py    ← HumanPlayer + in-game commands
    └── setup.py      ← Name / color / icon / difficulty wizard
tests/                ← ~220 pytest cases
docs/
├── rules.md          ← Canonical ruleset
└── HOWTO_PUBLISH.md  ← Release runbook
LICENSE               ← CC BY-NC-ND 4.0 © SilverSummitCo LLC
CHANGELOG.md
pyproject.toml

Status

Alpha. The game is feature-complete from a play standpoint; the next publication step is on PyPI. See CHANGELOG.md for the unreleased feature list and docs/HOWTO_PUBLISH.md for the publish runbook.


License

CC BY-NC-ND 4.0 — Copyright © 2024-2026 SilverSummitCo LLC. All rights reserved.

Free to share (unmodified) for personal and educational use. No modifications. No commercial use. Both require the prior written permission of SilverSummitCo LLC.

Contact: silversummitco@proton.me · See LICENSE for full terms.

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

bop_chess-0.1.1.tar.gz (96.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bop_chess-0.1.1-py3-none-any.whl (79.6 kB view details)

Uploaded Python 3

File details

Details for the file bop_chess-0.1.1.tar.gz.

File metadata

  • Download URL: bop_chess-0.1.1.tar.gz
  • Upload date:
  • Size: 96.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for bop_chess-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b9d0ad6ec1e5e7d78020da50ac11507a57f8e0cbaa92c9f4e6bc34b9ea1c059a
MD5 60c10fc339a50242c8b0b385f3e039cc
BLAKE2b-256 9ecda076d25e063b13f4e94fa3f3f6f12adc96f5f145e3b6b9677cf1cf1c1804

See more details on using hashes here.

File details

Details for the file bop_chess-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: bop_chess-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 79.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for bop_chess-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 879dd6662f2d99546e704ecb149f6d5dfc511b8ef641961a1f18b16c86a03549
MD5 f71c2ea755a9e7d2b2e21da0c10e0463
BLAKE2b-256 98969e5173cd07906a35aeda1bf207f9082da0b6f3af33dbb124ae0a3331c0ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page