https://github.com/caohuilin/snake_react_v2
React-Redux-Typescript-Immutable实现贪吃蛇小游戏
https://github.com/caohuilin/snake_react_v2
game immutablejs react redux snake-game typescript
Last synced: 11 months ago
JSON representation
React-Redux-Typescript-Immutable实现贪吃蛇小游戏
- Host: GitHub
- URL: https://github.com/caohuilin/snake_react_v2
- Owner: caohuilin
- Created: 2017-10-16T13:33:35.000Z (over 8 years ago)
- Default Branch: develop
- Last Pushed: 2017-11-28T07:57:00.000Z (over 8 years ago)
- Last Synced: 2025-04-30T20:06:32.735Z (11 months ago)
- Topics: game, immutablejs, react, redux, snake-game, typescript
- Language: TypeScript
- Homepage: https://caohuilin.github.io/Snake_React_v2/
- Size: 1.05 MB
- Stars: 31
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 贪吃蛇小游戏(第二版)

2015年,React诞生不久,想着它组件的生命周期管理可以用来写小游戏,于是贪吃蛇小游戏V1版本诞生了 https://github.com/caohuilin/Snake_React ,现在还记得当时完成的兴奋和喜悦。
后来,学习了Redux, Immutable,一直想重新写一下这个项目。
苦于一直忙于工作,没有空。
近期终于有空更新项目,于是V2就来了 https://caohuilin.github.io/Snake_React_v2
## 概述
React生态圈技术实现网页版贪吃蛇小游戏。模拟游戏机界面,传统的游戏模式,找回小时候的回忆!
## 游戏规则
贪吃蛇大家都不陌生了,吃掉一个食物,蛇的身体会变长,食物随机出现在屏幕的另一个位置。碰到自己或者碰到墙壁游戏结束。
注意一点就是设置目前只支持游戏模式的设置。
点击设置按钮后,点击左键或者右键进行模式切换。
## 项目安装部署
### Install
```
yarn install
```
### Start Serve
It's served in http://localhost:3000 .
```
yarn run serve
```
### Build
```
yarn run build
```
## 试玩
https://caohuilin.github.io/Snake_React_v2

## 补充
基本功能已经实现,难免有处理不当或者没有考虑到的界限问题,欢迎提Issue,https://github.com/caohuilin/Snake_React_v2
祝大家玩的愉快!