Skip to main content

Nonebot2 象棋插件

Project description

nonebot-plugin-cchess

适用于 Nonebot2 的象棋插件。

安装

  • 使用 nb-cli
nb plugin install nonebot_plugin_cchess
  • 使用 pip
pip install nonebot_plugin_cchess

人机功能 需要使用遵循 UCCI协议 的引擎

需要在 .env 文件中添加 引擎的可执行文件的路径

cchess_engine_path=/path/to/your/engine

经试用可用的引擎:

注意,Fairy-Stockfish 支持多种游戏,需要选择支持 Xiangqi 的发行版,即需要选带有 largeboard 的版本

使用

以下命令需要加命令前缀 (默认为/),可自行设置为空

@我 + “象棋人机”或“象棋对战”开始一局游戏;

可使用“lv1~8”指定AI等级,如“象棋人机lv5”,默认为“lv4”;

发送 中文纵线格式如“炮二平五” 或 起始坐标格式如“h2e2”下棋;

发送“结束下棋”结束当前棋局;

发送“显示棋盘”显示当前棋局;

发送“悔棋”可进行悔棋(人机模式可无限悔棋;对战模式只能撤销自己上一手下的棋);

或者使用 cchess 指令:

可用选项:

  • -e, --stop, --end: 停止下棋
  • -v, --show, --view: 显示棋盘
  • --repent: 悔棋
  • --reload: 重新加载已停止的游戏
  • --battle: 对战模式,默认为人机模式
  • --black: 执黑,即后手
  • -l <LEVEL>, --level <LEVEL>: 人机等级,可选 1~8,默认为 4

示例

特别感谢

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

nonebot_plugin_cchess-0.4.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

nonebot_plugin_cchess-0.4.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_cchess-0.4.0.tar.gz.

File metadata

  • Download URL: nonebot_plugin_cchess-0.4.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2

File hashes

Hashes for nonebot_plugin_cchess-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9803e55d0b92c59cedea2ee76e7377d85af904c4017138c2cbb8d7d3bdf2d905
MD5 8f0fbe7badad4df826c42554981cc03f
BLAKE2b-256 6a9a3f52c1fc511f4385e514b434acbb668338470e88c4a6183e86d9c1af33f0

See more details on using hashes here.

File details

Details for the file nonebot_plugin_cchess-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: nonebot_plugin_cchess-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2

File hashes

Hashes for nonebot_plugin_cchess-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f81676be1c6496d8b07d3e13d20802b70f12ac72d857162fd6a922014685e1a3
MD5 40666043a68390649217b1ac07d744a0
BLAKE2b-256 e6f7ef9e4a038b8d7a17b90762826ef607c0c9bfa99ecc39b6596d3f30b1420a

See more details on using hashes here.

Supported by

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