A cross-language library for Gliński's hexagonal chess, and the brain of hexchess.club.
Depending on which library you're working on, you'll need to install a few dependencies.
First, clone the repository, and setup the CLI.
git clone git@github.com:scottbedard/hexchess.git
cd hexchess
pnpm install
Next run node hexchess to see the following commands.
Usage: hexchess [options] [command]
Options:
-h, --help display help for command
Commands:
build Build all projects
build:engine Build engine package
build:js Build NPM package
build:rs Build Rust crate
docs:dev Develop docs
docs:build Build docs
docs:preview Preview docs
lint:php Run linting
test Run all tests
test:engine [options] Run engine tests
test:js [options] Run JavaScript tests
test:php [options] Run PHP tests
test:rs [options] Run Rust tests
version [options] [version] Set the version of the project
version:check [options] Check the versions of the dependencies
help [command] display help for command
The pyengine package exposes the same engine command interface over FastAPI.
python -m venv .venv
.venv/Scripts/activate
pip install -r pyengine/requirements.txt
uvicorn pyengine.main:app --reload --host 127.0.0.1 --port 8000Then open the docs sandbox and pick Python (FastAPI) from the engine selector.
The cyengine package is a compiled Cython variant of the Python engine. It keeps the same FastAPI contract and engine command shape, but builds the core engine module as a native extension.
python -m venv .venv
.venv/Scripts/activate
pip install -r cyengine/requirements.txt
pip install -e ./cyengine
uvicorn cyengine.main:app --reload --host 127.0.0.1 --port 8001Run python -m unittest cyengine.test_native_engine after building to validate the compiled engine.
Copyright (c) 2024-present, Scott Bedard