nonebot-plugin-chess
适用于 Nonebot2 的国际象棋插件。
安装
- 使用 nb-cli
nb plugin install nonebot_plugin_chess
- 使用 pip
pip install nonebot_plugin_chess
人机功能 需要使用遵循 UCI协议 的引擎
需要在 .env 文件中添加 引擎的可执行文件的路径
chess_engine_path=/path/to/your/engine
推荐的引擎:
使用
以下命令需要加命令前缀 (默认为/),可自行设置为空
@我 + “国际象棋人机”或“国际象棋对战”开始一局游戏;
可使用“lv1~8”指定AI等级,如“国际象棋人机lv5”,默认为“lv4”;
发送 起始坐标格式,如“e2e4”下棋;
在坐标后加棋子字母表示升变,如“e7e8q”表示升变为后;
对应的字母:K:王,Q:后,B:象,N:马,R:车,P:兵
发送“结束下棋”结束当前棋局;
发送“显示棋盘”显示当前棋局;
发送“悔棋”可进行悔棋(人机模式可无限悔棋;对战模式只能撤销自己上一手下的棋);
或者使用 chess 指令:
可用选项:
--battle: 对战模式,默认为人机模式--black: 执黑,即后手-l <LEVEL>,--level <LEVEL>: 人机等级,可选 1~8,默认为 4
示例
特别感谢
- niklasf/python-chess A chess library for Python
- official-stockfish/Stockfish UCI chess engine
Metadata
Release files for nonebot_plugin_chess 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_chess-0.5.2.tar.gz | 9.6 kB | Without provenance | Details for nonebot_plugin_chess-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_chess-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_chess-0.5.2-py3-none-any.whl |
Total release size: 20.1 kB
Release files / nonebot_plugin_chess-0.5.2.tar.gz
| Download URL | nonebot_plugin_chess-0.5.2.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38890c546d67871b9618c95a32ade38c25b031b7130f83aeca02313ad8118daa
|
|
BLAKE2b-256 checksum How to use checksums |
34b4885df5bc1f8cacb1e2b61a528495f0e4d679fbd15d1b2d9d81671e84575f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.11.0 Linux/6.5.0-1025-azure
|
Release files / nonebot_plugin_chess-0.5.2-py3-none-any.whl
| Download URL | nonebot_plugin_chess-0.5.2-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e27000e64e2e73cf510023fbbcc82fad0e9d4567d12d9eab7c5ef7f729e88fa
|
|
BLAKE2b-256 checksum How to use checksums |
3c4deacdf5ecfe1071d77f05acba02953a25371046aca489bdc7014cc2e1ee9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.11.0 Linux/6.5.0-1025-azure
|
Security for nonebot_plugin_chess 0.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.