A command-line tic-tac-toe game
Project description
pyjzq
这是一个基于命令行的井字棋游戏。
安装
pip install pyjzq
使用方法
在Python代码中使用 你可以在Python代码中导入并使用这个包。以下是一个简单的示例:
from pyjzq import TicTacToe, play
# 创建游戏实例
game = TicTacToe()
# 开始游戏
play(game, 'X', 'O')
示例输出
以下是运行上述代码时的示例输出:
| 0 | 1 | 2 |
| 3 | 4 | 5 |
| 6 | 7 | 8 |
X makes a move to square 0
| X | | |
| | | |
| | | |
O makes a move to square 1
| X | O | |
| | | |
| | | |
...
X wins!
开发
如果你想要为这个项目做出贡献,你可以按照以下步骤进行开发和测试:
克隆仓库
bash
git clone https://github.com/tianhukj/pyjzq.git
创建虚拟环境并安装依赖
cd pyjzq
python -m venv venv
source venv/bin/activate # Windows 上使用 `venv\Scripts\activate`
pip install -r requirements.txt
运行测试
pytest
许可证
该项目使用 MIT 许可证
#贡献
欢迎贡献!请阅读 CONTRIBUTING.md 了解详细的贡献流程。
反馈
如果你有任何问题或建议,请通过 Issues 页面反馈。
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
pyjzq-0.1.tar.gz
(4.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pyjzq-0.1-py3-none-any.whl
(4.2 kB
view details)
File details
Details for the file pyjzq-0.1.tar.gz.
File metadata
- Download URL: pyjzq-0.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91e39a4dc87077f8683c1eb81ba5e25d1bba78e6f320d39cadb6a651093e844c
|
|
| MD5 |
9a59d45e0b5fe40e6efa880409af9aaa
|
|
| BLAKE2b-256 |
a803ea68d61934a3d238adfe41642e09b18b36156ee62209161673925a393ac7
|
File details
Details for the file pyjzq-0.1-py3-none-any.whl.
File metadata
- Download URL: pyjzq-0.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74eda9e7c997f36147c93695fea39400a95e9a5f1bfe637b1ef7a98f90f93a1e
|
|
| MD5 |
4046ef054b83e1614599c4d0fa0e0c2c
|
|
| BLAKE2b-256 |
0f141b390af3e415c301b8398329c107088f528b382a35aefbdf557a51bde5d4
|