适用于 Nonebot2 的棋类游戏插件
Project description
nonebot-plugin-chess
适用于 Nonebot2 的棋类游戏插件。
抄自隔壁 koishi(:koishi-plugin-chess
安装
- 使用 nb-cli
nb plugin install nonebot_plugin_chess
- 使用 pip
pip install nonebot_plugin_chess
使用
目前支持的规则有:
- 五子棋
- 围棋(禁全同,暂时不支持点目)
- 黑白棋
开始和停止棋局
@机器人 发送 “围棋” 或 “五子棋” 或 “黑白棋” 开始一个对应的棋局,一个群组内同时只能有一个棋局。
或者使用 chess 指令:
chess --rule <rule> [--size <size>]
快捷名 | 规则名 | 默认大小 |
---|---|---|
围棋 | go | 19 |
五子棋 | gomoku | 15 |
黑白棋 / 奥赛罗 | othello | 8 |
输入 停止下棋
或者 chess --stop
可以停止一个正在进行的棋局。
落子,悔棋和跳过
输入 落子 position
如 落子 A1
或者 chess position
进行下棋。
当棋局开始时,第一个落子的人为先手,第二个落子的人为后手,此时棋局正式形成,其他人无法继续加入游戏。而参与游戏的两人可以依次使用“落子”指令进行游戏。
输入 悔棋
或者 chess --repent
进行悔棋,游戏会向前倒退一步。
输入 跳过回合
或者 chess --skip
可以跳过一个回合。
输入 查看棋局
或者 chess --view
可以查看当前棋局。
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for nonebot_plugin_chess-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | be2316a32ea03145436365c7242b63152342cb0f3c2b274cf8cf16a51cbdc399 |
|
MD5 | 36b0f23035a32528a72af0f0d5b0e302 |
|
BLAKE2b-256 | 65976e54048fe604c917a203f6db1c39cff7d6b696d2acf150259df370011d12 |
Close
Hashes for nonebot_plugin_chess-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c26bcf48ddf36648c2cd339cbb0573579607cfed7e367b3cc2bebbb740b3fd3 |
|
MD5 | c775129034c767e070a35453df1b00c8 |
|
BLAKE2b-256 | 7b9f2702e7f420bddaf1b5b07997bb94747fbfdaecf316a487b7db85f9782f41 |