# Chinese Puzzle

**A jigsaw puzzle game made from the Chinese characters**

## What is included in the package
 - `potato.php` - The server side
 - `chinese_puzzle.html` - The client side 
 - `list_generator.py` - A Python script to filter out the terms in `tsi.src` (you can obtain this file from https://github.com/chewing/libchewing-data)
 - `list.txt` - The term list generated by `list_generator.py`
 - `README.md` - The document you are reading right now.

## What is *NOT* included in the package, but you have to secure them in order to run the game
 - `jquery-3.2.1.min.js` from [jQuery](https://jquery.com/)
 - `bootstrap.min.css`, `bootstrap-theme.min.css` and `bootstrap.min.js` from [Bootstrap 3](http://getbootstrap.com/)
 - `spin.min.js` from [spin.js](http://spin.js.org/)
 - `SourceHanSerifTC-Bold.otf` from [Source Han Serif](https://source.typekit.com/source-han-serif/)

## How to run the game by yourself
1. You need to have [PHP](https://secure.php.net/) and [ImageMagick](https://www.imagemagick.org/script/index.php) installed on your system. I was using PHP 7.0.24 and ImageMagick 6.9.9 during the development.
2. Make sure that you have `/usr/bin/convert` (A tool from ImageMagick) in your system. If you have placed the tool in the different location, you can modify `potato.php` to point to the correct path.
3. Since you have PHP installed, you can simply start the built-in web server from PHP:
```bash
cd chinese_puzzle
php -S localhost:8080
```
4. After that, just open the web browser and go to `http://localhost:8080/chinese_puzzle.html` to see the game running. The game was tested on the recent versions of Mozilla Firefox and Google Chrome. The much outdated browsers may not be supported.

## ChangeLog

20220527:
 - Remove the redundant code of the shuffling functionality.

20171104:
 - The first release.

#### Author: DarkRanger (https://darkranger.no-ip.org)
#### License: MIT License
