-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
52 lines (48 loc) · 1.7 KB
/
index.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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>2048</title>
<link rel="stylesheet" href="css/_2048.css"/>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="js/_2048.js"></script>
</head>
<body>
<header>
<h1>2048</h1>
<span id="gameResetBtn" class="pointer">Reset</span>
<p>score: <span id="score">0</span></p>
</header>
<div id="container">
<div class="cell" id="cell_0_0"></div>
<div class="cell" id="cell_0_1"></div>
<div class="cell" id="cell_0_2"></div>
<div class="cell" id="cell_0_3"></div>
<div class="cell" id="cell_1_0"></div>
<div class="cell" id="cell_1_1"></div>
<div class="cell" id="cell_1_2"></div>
<div class="cell" id="cell_1_3"></div>
<div class="cell" id="cell_2_0"></div>
<div class="cell" id="cell_2_1"></div>
<div class="cell" id="cell_2_2"></div>
<div class="cell" id="cell_2_3"></div>
<div class="cell" id="cell_3_0"></div>
<div class="cell" id="cell_3_1"></div>
<div class="cell" id="cell_3_2"></div>
<div class="cell" id="cell_3_3"></div>
</div>
</body>
<script>
$(function() {
var args = {
$score: $("#score"),
$container: $("#container"),
$cells: $(".cell"),
cellPrefix: "cell_",
$gameResetBtn: $("#gameResetBtn"),
};
handler2048.newHandler(args);
})
</script>
</html>