-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·133 lines (131 loc) · 6.05 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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2048 | Web Game</title>
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="assets/css/main.css">
</head>
<body>
<main>
<section id="game-viewport">
<div class="row">
<div class="col-lg-8 bg-primary" id="game-wrapper">
<h1 class="heading">Play 2048 Game!</h1>
<span class="instruction">
How To Play: Use your arrow keys or mouse drag to move the tiles. When two tiles with the same number touch, they merge into one!
</span>
<div class="row align-items-flex-end">
<div class="col-sm-6 col-md-7 col-xl-6">
<div id="game-grid-wrapper">
<div id="game-grid">
</div>
<div id="filled-grid">
</div>
<div id="game-over">
<h3 class="game-over-title">Game Over</h3>
<span class="score-label">Your Score: <span class="current-score">0</span></span>
<span class="score-label">Your Best Score: <span class="best-score">0</span></span>
<a class="btn btn-primary" href="javascript:void(0)" onclick="restart();">Play Again!</a>
</div>
</div>
</div>
<div class="col-sm-6 col-md-5 col-xl-6">
<h4 class="heading">Name: <span id="player-name" class="float-right">Guest</span></h4>
<span class="label-block">Score: <span class="current-score">0</span></span>
<span class="label-block">Best: <span class="best-score">0</span></span>
</div>
</div>
</div>
<div class="col-lg-4 bg-secondary" id="leaderboard">
<div id="list-container">
<h2 class="heading">
Top <span id="scores-count">50</span> Scores
</h2>
<ul class="list">
<li class="list-item">
<span class="name">Ruchit Parikh</span>
<span class="points">9999</span>
</li>
</ul>
</div>
<div id="login-form" class="form-container">
<div class="row">
<div class="col-md-12">
<h2 class="heading">Sign In To Leaderboard</h2>
</div>
</div>
<div class="row">
<div class="col-md-12">
<form action="/login" method="post" enctype="multipart/form-data">
<div class="form-group">
<input class="form-control" name="email" type="email" placeholder="Email" required>
</div>
<div class="form-group">
<input class="form-control" name="password" type="password" minlength="8" maxlength="32" placeholder="Password" required>
</div>
<button href="javascript:void(0)" type="submit" class="btn btn-ternary btn-submit">Sign In</button>
<a href="javascript:void(0)" class="btn btn-ternary" onclick="loadRegisterForm(true)">Register</a>
</form>
</div>
</div>
<div class="row my-3">
<div class="col-md-12 text-center text-white" style="font-weight: 600;">
©<script type="text/javascript">document.write(new Date().getFullYear())</script> Made With Love By Riyo
</div>
</div>
</div>
<div id="register-form" class="form-container">
<div class="row">
<div class="col-md-12">
<h2 class="heading">Register For New User</h2>
</div>
</div>
<div class="row">
<div class="col-md-12">
<form action="/register" method="post" enctype="multipart/form-data">
<div class="form-group">
<input class="form-control" name="name" type="text" placeholder="Your Name" required>
</div>
<div class="form-group">
<input class="form-control" name="email" type="email" placeholder="Email" required>
</div>
<div class="form-group">
<input class="form-control" name="password" type="password" minlength="8" maxlength="32" placeholder="Password" required>
</div>
<div class="form-group">
<input class="form-control" name="confirm_password" type="password" minlength="8" maxlength="32" placeholder="Confirm Password" required>
</div>
<a href="javascript:void(0)" class="btn btn-ternary" onclick="loadRegisterForm(false)">Back</a>
<button href="javascript:void(0)" type="submit" class="btn btn-ternary btn-submit">Register</button>
</form>
</div>
</div>
<div class="row my-3">
<div class="col-md-12 text-center text-white" style="font-weight: 600;">
©<script type="text/javascript">document.write(new Date().getFullYear())</script> Made With Love By Riyo
</div>
</div>
</div>
<div id="messages">There is some error processing your request!</div>
</div>
</div>
</section>
</main>
<script src="assets/js/config.js"></script>
<script src="assets/js/polyfill.js"></script>
<script src="assets/js/runtime.js"></script>
<script src="assets/js/polyfill-babel.js"></script>
<script src="assets/js/fetch.js"></script>
<script src="assets/js/helpers.js"></script>
<script src="assets/js/auth-manager.js"></script>
<script src="assets/js/data-manager.js"></script>
<script src="assets/js/game-grid.js"></script>
<script src="assets/js/score-manager.js"></script>
<script src="assets/js/input-manager.js"></script>
<script src="assets/js/game-manager.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>