Skip to content

Commit 6070393

Browse files
committed
game finished
0 parents  commit 6070393

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+5307
-0
lines changed

.babelrc

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"presets":["react","es2015"],
3+
"env":{
4+
"development":{
5+
"plugins":[
6+
[
7+
"react-transform",
8+
{
9+
"transforms":[
10+
{
11+
"transform":"react-transform-hmr",
12+
"imports":["react"],
13+
"locals":["module"]
14+
}
15+
]
16+
}
17+
]
18+
]
19+
}
20+
}
21+
}

.eslintrc.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
"extends": "airbnb",
3+
"installedESLint": true,
4+
"plugins": [
5+
"react"
6+
],
7+
"rules": {
8+
"react/jsx-filename-extension": [2, { extensions: ['.js','.jsx'] }],
9+
"func-names": [0],
10+
"new-cap": [2, { newIsCap: true ,capIsNew: true, capIsNewExceptions: ['List', 'Map']}],
11+
"linebreak-style": [0]
12+
},
13+
"env": {
14+
"browser": true
15+
}
16+
};

.gitignore

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
### Node template
2+
# Logs
3+
logs
4+
*.log
5+
npm-debug.log*
6+
.DS_Store
7+
# Runtime data
8+
pids
9+
*.pid
10+
*.seed
11+
12+
# Directory for instrumented libs generated by jscoverage/JSCover
13+
lib-cov
14+
15+
# Coverage directory used by tools like istanbul
16+
coverage
17+
18+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
19+
.grunt
20+
21+
# node-waf configuration
22+
.lock-wscript
23+
24+
# Compiled binary addons (http://nodejs.org/api/addons.html)
25+
build/Release
26+
27+
# Dependency directories
28+
node_modules
29+
jspm_packages
30+
31+
# Optional npm cache directory
32+
.npm
33+
34+
# Optional REPL history
35+
.node_repl_history
36+
37+
# Created by .ignore support plugin (hsz.mobi)

.idea/encodings.xml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jsLibraryMappings.xml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/react-tetris.iml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/watcherTasks.xml

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

+942
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# 用React+Redux+Immutable做 《俄罗斯方块》。
2+
# Use Tetact, Redux, Immutable to coding "Tetris".
3+
--------------------------------------------
4+
5+
### 安装 | Install
6+
```
7+
npm install
8+
```
9+
10+
### 开发 | Development
11+
```
12+
npm start
13+
```
14+
open [http://0.0.0.0:8080/](http://0.0.0.0:8080/)
15+
16+
### 打包 | Build
17+
## Mac:
18+
```
19+
npm run MacBuild
20+
```
21+
## Windows:
22+
```
23+
npm run WindowsBuild
24+
```

build/app-1.0.0.js

+28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/app-1.0.0.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/css-1.0.0.css

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/css-1.0.0.css.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/index.html

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta name="renderer" content="webkit">
5+
<meta name="description" content="使用React、Redux、Immutable制作的俄罗斯方块" />
6+
<meta name="keywords" content="俄罗斯方块,Tetris,React,Redux,Immuatble,JavaScript">
7+
<meta name="format-detection" content="telephone=no"/>
8+
<script>;(function(){var w=parseInt(window.screen.width),s=w/640,u=navigator.userAgent.toLowerCase(),m='<meta name="viewport" content="width=640,';if(/android (\d+\.\d+)/.test(u)){if(parseFloat(RegExp.$1)>2.3)m+='minimum-scale='+s+',maximum-scale='+s+',';}else{m+='user-scalable=no,';}m+='target-densitydpi=device-dpi">';document.write(m);}());</script>
9+
<meta charset="UTF-8">
10+
<title>俄罗斯方块</title>
11+
<link href="./loader.css" rel="stylesheet" />
12+
<link href="css-1.0.0.css" rel="stylesheet"></head>
13+
<body>
14+
<div id="root">
15+
<div class="load">
16+
<div class="loader">加载中...</div>
17+
</div>
18+
</div>
19+
<script type="text/javascript" src="app-1.0.0.js"></script></body>
20+
</html>

build/loader.css

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
body{
2+
background: #009688;
3+
padding: 0;
4+
margin: 0;
5+
}
6+
.load{
7+
width:240px;
8+
height:240px;
9+
position:absolute;
10+
top:50%;
11+
left:50%;
12+
margin:-120px 0 0 -120px;
13+
color:#efcc19;
14+
-webkit-animation:fadeIn 2s infinite ease-in-out;
15+
animation:fadeIn 2s infinite ease-in-out;
16+
-webkit-animation-delay:2s;
17+
animation-delay:2s;
18+
opacity:0;
19+
}
20+
.load .loader,.load .loader:before,.load .loader:after{
21+
background:#efcc19;
22+
-webkit-animation:load 1s infinite ease-in-out;
23+
animation:load 1s infinite ease-in-out;
24+
width:1em;
25+
height:4em
26+
}
27+
.load .loader:before,.load .loader:after{
28+
position:absolute;
29+
top:0;
30+
content:''
31+
}
32+
.load .loader:before{
33+
left:-1.5em;
34+
-webkit-animation-delay:-0.32s;
35+
animation-delay:-0.32s
36+
}
37+
.load .loader{
38+
text-indent:-9999em;
39+
margin:8em auto;
40+
position:relative;
41+
font-size:11px;
42+
-webkit-animation-delay:-0.16s;
43+
animation-delay:-0.16s
44+
}
45+
.load .loader:after{
46+
left:1.5em
47+
}
48+
@-webkit-keyframes load{
49+
0%,80%,100%{
50+
box-shadow:0 0 #efcc19;
51+
height:4em
52+
}
53+
40%{
54+
box-shadow:0 -2em #efcc19;height:5em
55+
}
56+
}
57+
58+
@keyframes load{
59+
0%,80%,100%{
60+
box-shadow:0 0 #efcc19;
61+
height:4em
62+
}
63+
40%{
64+
box-shadow:0 -2em #efcc19;
65+
height:5em
66+
}
67+
}
68+
69+
@-webkit-keyframes fadeIn{
70+
0%{
71+
opacity:0;
72+
}
73+
100%{
74+
opacity:1;
75+
}
76+
}
77+
@keyframes fadeIn{
78+
0%{
79+
opacity:0;
80+
}
81+
100%{
82+
opacity:1;
83+
}
84+
}

build/music.mp3

53.1 KB
Binary file not shown.

i18n.json

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"lan": ["cn", "en"],
3+
"default": "cn",
4+
"data": {
5+
"title": {
6+
"cn": "俄罗斯方块",
7+
"en": "T E T R I S"
8+
},
9+
"about": {
10+
"cn": "关于\"\"",
11+
"en": "About ME"
12+
},
13+
"QRCode":{
14+
"cn": "二维码",
15+
"en": "QR code"
16+
},
17+
"QRNotice": {
18+
"cn": "扫一扫用手机玩",
19+
"en": "Scan QR code to play with a mobile phone"
20+
},
21+
"linkTitle": {
22+
"cn": "使用React、Redux、Immutable编写「俄罗斯方块」",
23+
"en": "Use Tetact, Redux, Immutable to coding \"Tetris\""
24+
},
25+
"titleCenter": {
26+
"cn": "俄罗斯方块<br />TETRIS",
27+
"en": "TETRIS"
28+
},
29+
"point": {
30+
"cn": "得分",
31+
"en": "Point"
32+
},
33+
"highestScore": {
34+
"cn": "最高分",
35+
"en": "Max"
36+
},
37+
"lastRound": {
38+
"cn": "上轮得分",
39+
"en": "Last Round"
40+
},
41+
"cleans": {
42+
"cn": "消除行",
43+
"en": "Cleans"
44+
},
45+
"level": {
46+
"cn": "级别",
47+
"en": "Level"
48+
},
49+
"startLine": {
50+
"cn": "起始行",
51+
"en": "Start Line"
52+
},
53+
"next": {
54+
"cn": "下一个",
55+
"en": "Next"
56+
},
57+
"pause": {
58+
"cn": "暂停",
59+
"en": "Pause"
60+
},
61+
"sound": {
62+
"cn": "音效",
63+
"en": "Sound"
64+
},
65+
"reset": {
66+
"cn": "重玩",
67+
"en": "Reset"
68+
},
69+
"rotation": {
70+
"cn": "旋转",
71+
"en": "Rotation"
72+
},
73+
"left": {
74+
"cn": "左移",
75+
"en": "Left"
76+
},
77+
"right": {
78+
"cn": "右移",
79+
"en": "Right"
80+
},
81+
"down": {
82+
"cn": "下移",
83+
"en": "Down"
84+
},
85+
"drop": {
86+
"cn": "掉落",
87+
"en": "Drop"
88+
}
89+
}
90+
}

0 commit comments

Comments
 (0)