├── LICENSE
├── README.md
├── audio
├── click.wav
└── select.wav
├── css
└── chess.css
├── favicon.ico
├── icon.png
├── img
├── btn_bg.png
├── btn_fh.png
├── init_bg.png
├── stype_1
│ ├── b_box.png
│ ├── b_c.png
│ ├── b_j.png
│ ├── b_m.png
│ ├── b_p.png
│ ├── b_s.png
│ ├── b_x.png
│ ├── b_z.png
│ ├── bg.jpg
│ ├── bg.png
│ ├── dot.png
│ ├── r_box.png
│ ├── r_c.png
│ ├── r_j.png
│ ├── r_m.png
│ ├── r_p.png
│ ├── r_s.png
│ ├── r_x.png
│ └── r_z.png
├── stype_2
│ ├── b_c.png
│ ├── b_j.png
│ ├── b_m.png
│ ├── b_p.png
│ ├── b_s.png
│ ├── b_x.png
│ ├── b_z.png
│ ├── bg.jpg
│ ├── bg.png
│ ├── dot.png
│ ├── r_box.png
│ ├── r_c.png
│ ├── r_j.png
│ ├── r_m.png
│ ├── r_p.png
│ ├── r_s.png
│ ├── r_x.png
│ └── r_z.png
└── stype_3
│ ├── b_box.png
│ ├── b_c.png
│ ├── b_j.png
│ ├── b_m.png
│ ├── b_p.png
│ ├── b_s.png
│ ├── b_x.png
│ ├── b_z.png
│ ├── bg.jpg
│ ├── bg.png
│ ├── bg1.jpg
│ ├── bg2.jpg
│ ├── dot.png
│ ├── r_box.png
│ ├── r_c.png
│ ├── r_j.png
│ ├── r_m.png
│ ├── r_p.png
│ ├── r_s.png
│ ├── r_x.png
│ └── r_z.png
├── index.html
└── js
├── AI.js
├── bill.js
├── clasli.js
├── common.js
├── gambit.all.js
├── gambit.js
└── play.js
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 liwei
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 中国象棋 - in html5
2 | ===========
3 |
4 | 作者:一叶孤舟
5 | 联系:itlwei@163.com QQ:28701884
6 | Demo:https://itlwei.github.io/Chess/
7 |
8 | 中国象棋 - in html5是一款使用html5 canvas开发的开源小游戏,不依赖任何类库,不依赖任何后台程序,全部原生Javascript进行AI计算,欢迎广大业内同行多多交流指正,共同完善。
9 |
10 | ##特点
11 |
12 | * 全部使用Javascript完成AI人工智能计算,不依赖任何后台程序
13 | * 不依赖任何类库,全部原生Javascript,使用html5 canvas.
14 | * 实现中不涉及任何浏览器特性,所以不存在浏览器兼容性问题.
15 | * 代码结构极其简洁明了,你可以轻易的阅读,修改成自己版本.
16 |
17 | ##Change Log
18 | ### v1.5.1
19 | * 修复BUG
20 |
21 | ### v1.5.0
22 | * 大幅度修改UI,增加风格选择
23 |
24 | ### v1.0.3
25 | * 增加历史表,提高AI计算效率
26 |
27 | ### v1.0.2
28 | * 修复了AI计算过深的资源耗尽问题
29 |
30 | ### v1.0.1
31 | * 修复了一些情况下悔棋出错的问题
32 | * 修复了长将不死的问题
33 |
--------------------------------------------------------------------------------
/audio/click.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/audio/click.wav
--------------------------------------------------------------------------------
/audio/select.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/audio/select.wav
--------------------------------------------------------------------------------
/css/chess.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/css/chess.css
--------------------------------------------------------------------------------
/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/favicon.ico
--------------------------------------------------------------------------------
/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/icon.png
--------------------------------------------------------------------------------
/img/btn_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/btn_bg.png
--------------------------------------------------------------------------------
/img/btn_fh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/btn_fh.png
--------------------------------------------------------------------------------
/img/init_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/init_bg.png
--------------------------------------------------------------------------------
/img/stype_1/b_box.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/b_box.png
--------------------------------------------------------------------------------
/img/stype_1/b_c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/b_c.png
--------------------------------------------------------------------------------
/img/stype_1/b_j.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/b_j.png
--------------------------------------------------------------------------------
/img/stype_1/b_m.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/b_m.png
--------------------------------------------------------------------------------
/img/stype_1/b_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/b_p.png
--------------------------------------------------------------------------------
/img/stype_1/b_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/b_s.png
--------------------------------------------------------------------------------
/img/stype_1/b_x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/b_x.png
--------------------------------------------------------------------------------
/img/stype_1/b_z.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/b_z.png
--------------------------------------------------------------------------------
/img/stype_1/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/bg.jpg
--------------------------------------------------------------------------------
/img/stype_1/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/bg.png
--------------------------------------------------------------------------------
/img/stype_1/dot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/dot.png
--------------------------------------------------------------------------------
/img/stype_1/r_box.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/r_box.png
--------------------------------------------------------------------------------
/img/stype_1/r_c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/r_c.png
--------------------------------------------------------------------------------
/img/stype_1/r_j.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/r_j.png
--------------------------------------------------------------------------------
/img/stype_1/r_m.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/r_m.png
--------------------------------------------------------------------------------
/img/stype_1/r_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/r_p.png
--------------------------------------------------------------------------------
/img/stype_1/r_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/r_s.png
--------------------------------------------------------------------------------
/img/stype_1/r_x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/r_x.png
--------------------------------------------------------------------------------
/img/stype_1/r_z.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_1/r_z.png
--------------------------------------------------------------------------------
/img/stype_2/b_c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/b_c.png
--------------------------------------------------------------------------------
/img/stype_2/b_j.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/b_j.png
--------------------------------------------------------------------------------
/img/stype_2/b_m.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/b_m.png
--------------------------------------------------------------------------------
/img/stype_2/b_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/b_p.png
--------------------------------------------------------------------------------
/img/stype_2/b_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/b_s.png
--------------------------------------------------------------------------------
/img/stype_2/b_x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/b_x.png
--------------------------------------------------------------------------------
/img/stype_2/b_z.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/b_z.png
--------------------------------------------------------------------------------
/img/stype_2/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/bg.jpg
--------------------------------------------------------------------------------
/img/stype_2/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/bg.png
--------------------------------------------------------------------------------
/img/stype_2/dot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/dot.png
--------------------------------------------------------------------------------
/img/stype_2/r_box.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/r_box.png
--------------------------------------------------------------------------------
/img/stype_2/r_c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/r_c.png
--------------------------------------------------------------------------------
/img/stype_2/r_j.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/r_j.png
--------------------------------------------------------------------------------
/img/stype_2/r_m.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/r_m.png
--------------------------------------------------------------------------------
/img/stype_2/r_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/r_p.png
--------------------------------------------------------------------------------
/img/stype_2/r_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/r_s.png
--------------------------------------------------------------------------------
/img/stype_2/r_x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/r_x.png
--------------------------------------------------------------------------------
/img/stype_2/r_z.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_2/r_z.png
--------------------------------------------------------------------------------
/img/stype_3/b_box.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/b_box.png
--------------------------------------------------------------------------------
/img/stype_3/b_c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/b_c.png
--------------------------------------------------------------------------------
/img/stype_3/b_j.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/b_j.png
--------------------------------------------------------------------------------
/img/stype_3/b_m.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/b_m.png
--------------------------------------------------------------------------------
/img/stype_3/b_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/b_p.png
--------------------------------------------------------------------------------
/img/stype_3/b_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/b_s.png
--------------------------------------------------------------------------------
/img/stype_3/b_x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/b_x.png
--------------------------------------------------------------------------------
/img/stype_3/b_z.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/b_z.png
--------------------------------------------------------------------------------
/img/stype_3/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/bg.jpg
--------------------------------------------------------------------------------
/img/stype_3/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/bg.png
--------------------------------------------------------------------------------
/img/stype_3/bg1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/bg1.jpg
--------------------------------------------------------------------------------
/img/stype_3/bg2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/bg2.jpg
--------------------------------------------------------------------------------
/img/stype_3/dot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/dot.png
--------------------------------------------------------------------------------
/img/stype_3/r_box.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/r_box.png
--------------------------------------------------------------------------------
/img/stype_3/r_c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/r_c.png
--------------------------------------------------------------------------------
/img/stype_3/r_j.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/r_j.png
--------------------------------------------------------------------------------
/img/stype_3/r_m.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/r_m.png
--------------------------------------------------------------------------------
/img/stype_3/r_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/r_p.png
--------------------------------------------------------------------------------
/img/stype_3/r_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/r_s.png
--------------------------------------------------------------------------------
/img/stype_3/r_x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/r_x.png
--------------------------------------------------------------------------------
/img/stype_3/r_z.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itlwei/Chess/e8b4c0fea5220e08528286b157caa8f884f62505/img/stype_3/r_z.png
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |