-
Notifications
You must be signed in to change notification settings - Fork 0
/
board.html
96 lines (68 loc) · 2.38 KB
/
board.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html>
<head>
<title>2048</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="static/bootstrap.css" rel="stylesheet">
<link href="static/style.css" rel="stylesheet">
<script src="static/vue.js"></script>
<script src="static/vue-resource.js"></script>
<link href="static/favicon.ico" rel="icon" type="image/x-icon" />
</head>
<body>
<h1 align="center">2048 Game</h1>
<h4 align="center">Use ↑ ↓ ← → to play, or any other keys for "AUTO-mode" by your agent.</h4>
<div class="container" id="app">
<div class="row row-content">
<div class="col-xs-6">
<h1>
Score: {{score}}
</h1>
</div>
<div class="col-xs-6" align="right">
<h1>
<span v-if="end==1">You lose!</span>
<span v-if="end==2">You win!</span>
</h1>
</div>
<div class="col-xs-12">
<table align=center>
<tr v-for="row in board">
<td v-for="item in row">
<span v-if="item!=0">{{item}}</span>
</td>
</tr>
</table>
</div>
<div class="col-xs-6">
<h3>
<span v-if="direction!=-1">Last move:</span>
<span v-if="direction==0">←</span>
<span v-if="direction==1">↓</span>
<span v-if="direction==2">→</span>
<span v-if="direction==3">↑</span>
</h3>
</div>
<div class="col-xs-6" align="right">
<h3>
Controlled by {{control}}
</h3>
</div>
</div>
</div>
<footer class="row-footer">
<div class="container">
<div class="row">
<div class="col-xs-12">
<h3 align=center>
Copyright © 2016-2018 <a href="https://github.com/duducheng">Jiancheng</a>
</h3>
</div>
</div>
</div>
</footer>
<script src="static/app.js"></script>
</body>
</html>