From 885bd5dda56f1e0e89c20e9e4252cd47e6c759b9 Mon Sep 17 00:00:00 2001 From: remote-agent Date: Fri, 26 Dec 2025 01:37:53 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 52 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 1cf5d86..dcd6893 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,50 @@ # harmless -A chinese chess engine +A Chinese Chess (Xiangqi) engine implemented in C, with a graphical user interface written in Python. -## INSTALL +## Features -### GNU/Linux and Mac OS X User +- **Engine**: Efficient C-based engine supporting the UCCI protocol. +- **GUI**: User-friendly interface built with Python and Pygame. +- **Modes**: + - **AI Mode**: Play against the computer. + - **Network Mode**: Support for network play (experimental). -> require +## Prerequisites -* `python-2.7.x`: -* `pygame-1.9.x`: +- **C Compiler**: GCC or compatible. +- **Make**: For building the project. +- **Python**: Python 2.7 (Legacy). +- **Pygame**: Library for the GUI (requires Pygame for Python 2). -Hint: install pygame on OS X Lion +## Build and Run - +### 1. Build the Engine -> run +Compile the source code and install the binary to the game directory: +```bash +make install ``` -$ git clone git://github.com/timebug/harmless.git -$ make && make install -$ cd pycchess && python cchess.py + +This will compile the C engine in `src/` and copy the `harmless` executable to the `pycchess/` directory. + +### 2. Run the Game + +Navigate to the game directory and start the Python script: + +```bash +cd pycchess +python cchess.py ``` -### Windows User +> **Note**: The codebase uses Python 2 syntax. Ensure you are using a Python 2 interpreter. + +## Controls -1. Access -2. Download `pycchess-win32-*.zip` then unzip it -3. Run `cchess.exe` +- **Space**: Start a new game / Restart. +- **Mouse**: Click to select and move pieces. -## KEYBOARD SHORTCUTS +## License -* `space`: new game +This project is licensed under the GNU General Public License v3 (GPLv3).