https://github.com/zswang/snake
简易贪吃蛇
https://github.com/zswang/snake
Last synced: 5 months ago
JSON representation
简易贪吃蛇
- Host: GitHub
- URL: https://github.com/zswang/snake
- Owner: zswang
- Created: 2015-08-24T13:13:37.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-08-25T16:54:01.000Z (almost 11 years ago)
- Last Synced: 2025-01-24T09:09:41.897Z (over 1 year ago)
- Language: HTML
- Size: 109 KB
- Stars: 11
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# snake
简易贪吃蛇
主要是示例 jdists + jfogs + uglify 用法
```js
/**/
function Snake(options) {
var self = this;
options = options || {};
this.colCount = options.colCount || 20;
this.rowCount = options.rowCount || 20;
this.parent = options.parent || document.body; // 容器
// ...
}
// ...
/**/
```
+ 先对代码做一次 jfogs 混淆
+ 然后再做一次 uglify 压缩
[线上演示](http://jhtmls.com/snake/)
## 使用
### 安装依赖
```bash
$ npm install
```
## 编译
```bash
$ npm run dist
```