-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
316 lines (298 loc) · 14.9 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<meta charset="utf-8">
<title>2048: Custom Mode</title>
<link href="style/main.css" rel="stylesheet" type="text/css">
<link rel="apple-touch-icon" sizes="180x180" href="/makeurown/icon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/makeurown/icon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="192x192" href="/makeurown/icon/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="16x16" href="/makeurown/icon/favicon-16x16.png">
<link rel="manifest" href="/makeurown/icon/site.webmanifest">
<link rel="mask-icon" href="/makeurown/icon/safari-pinned-tab.svg" color="#515151">
<link rel="shortcut icon" href="/makeurown/icon/favicon.ico">
<meta name="msapplication-TileColor" content="#9f00a7">
<meta name="msapplication-TileImage" content="/makeurown/icon/mstile-144x144.png">
<meta name="msapplication-config" content="/makeurown/icon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui">
</head>
<body>
<h1>There is a bug creating new custom 2048 games, we are working on it now.</h1>
<p>For now you can continue to play existing custom games in your account.</p>
<div class="container">
<div class="profile">
<h1 class="profile-desc">Not Logged In</h1>
<div class="vertical-seperate"></div>
<div class="tile-inner profile-picture"></div>
</div>
<hr>
<div id="firebaseui-auth2">
<h1 class="title2">Login</h1>
<div id="firebaseui-auth-container">
</div>
<div id="loader">Loading...</div>
</div>
<div class="heading2">
<h1 class="title2">2048: Custom Mode</h1>
<div id="container-above-game2" class="above-game2">
<p class="game-intro2">Track your scores, save your progress across devices, and make your own<strong> 2048!</strong></p>
<a class="restart-button2">Login</a>
<a class="restart-button3">Logout</a>
</div>
<p class="game-intro2"><strong>You Are Currently Playing: <a class="gameName">Normal 2048</a></strong></p>
</div>
<hr>
<div class="heading">
<h1 class="title">2048</h1>
<div class="scores-container">
<div class="score-container">0</div>
<div class="best-container">0</div>
</div>
</div>
<div class="above-game">
<p class="game-intro">Join the numbers and get to the <strong>2048 tile!</strong></p>
<a class="restart-button">New Game</a>
<a class="save-button">Save</a>
</div>
<div class="game-container">
<div class="game-message">
<p></p>
<div class="lower">
<a class="keep-playing-button">Keep going</a>
<a class="retry-button">Try again</a>
</div>
</div>
<div class="restore-message">
<div class="restore-hide">
<p>You have already started a game on another device, would you like to continue the old game, or start a new one? <strong>WARNING: You will loose your old game if you start a new one.</strong></p>
<a class="continue-button">Continue</a>
<a class="start-new-button">Start New</a>
</div>
</div>
<div class="login-hide">
<div class="lower-hide">
<p class="paused-button"><strong>Game Paused</strong><br><a class="unpause">Unpause</a></p>
</div>
</div>
<div class="grid-container">
<div class="grid-row">
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
</div>
<div class="grid-row">
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
</div>
<div class="grid-row">
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
</div>
<div class="grid-row">
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
</div>
</div>
<div class="tile-container">
</div>
</div>
<p class="game-explanation">
<strong class="important">How to play:</strong> Use your <strong>arrow keys</strong> to move the tiles. When two tiles with the same picture touch, they <strong>merge into one!</strong>
</p>
<hr>
<p>
<strong class="important">Note:</strong> This is a 2048 version I edited to display images instead of number cells as in the original one.
<br /> You can change images in the /img/ folder to custom yours.
</p>
<hr>
<p>
Edited by <a href="http://github.com/cdivry">Clément DIVRY</a> to make this game use pictures.
<br /> Forked from a <a href="http://gabrielecirulli.com" target="_blank">Gabriele Cirulli</a> project hosted <a href="http://github.com/gabrielecirulli/2048">here</a>, Based on <a href="https://itunes.apple.com/us/app/1024!/id823499224" target="_blank">1024 by Veewo Studio</a> and conceptually similar to <a href="http://asherv.com/threes/" target="_blank">Threes by Asher Vollmer.</a>
</p>
<hr>
<h1>Tile Key</h1>
<p>This is a key that shows you which images represent specific numbers in 2048, it updates when you change the game.</p>
<p><strong>Tile #2</strong></p><div class="tile-inner2"></div>
<br>
<p><strong>Tile #4</strong></p><div class="tile-inner4"></div>
<br>
<p><strong>Tile #8</strong></p><div class="tile-inner8"></div>
<br>
<p><strong>Tile #16</strong></p><div class="tile-inner16"></div>
<br>
<p><strong>Tile #32</strong></p><div class="tile-inner32"></div>
<br>
<p><strong>Tile #64</strong></p><div class="tile-inner64"></div>
<br>
<p><strong>Tile #128</strong></p><div class="tile-inner128"></div>
<br>
<p><strong>Tile #256</strong></p><div class="tile-inner256"></div>
<br>
<p><strong>Tile #512</strong></p><div class="tile-inner512"></div>
<br>
<p><strong>Tile #1024</strong></p><div class="tile-inner1024"></div>
<br>
<p><strong>Tile #2048</strong></p><div class="tile-inner2048"></div>
<hr>
<h1> Change Images </h1>
<div class="saved-games"></div>
<div class="sam game-explanation container-flex">
<br>
<p> Image for 2 </p>
<textarea class='input2' placeholder='www.starwars.com/darkvader.png'></textarea>
<br>
<p> Image for 4 </p>
<textarea class='input4' placeholder='www.starwars.com/lukeskywalker.png'></textarea>
<br>
<p> Image for 8 </p>
<textarea class='input8' placeholder='www.starwars.com/yoda.png'></textarea>
<br>
<p> Image for 16 </p>
<textarea class='input16' placeholder='www.starwars.com/samtheevil.png'></textarea>
<br>
<p> Image for 32 </p>
<textarea class='input32' placeholder='www.starwars.com/aidanthehacker.png'></textarea>
<br>
<p> Image for 64 </p>
<textarea class='input64' placeholder='www.starwars.com/urmom.png'></textarea>
<br>
<p> Image for 128 </p>
<textarea class='input128' placeholder='www.starwars.com/urdad.png'></textarea>
<br>
<p> Image for 256 </p>
<textarea class='input256' placeholder='www.starwars.com/ursister1.png'></textarea>
<br>
<p> Image for 512 </p>
<textarea class='input512' placeholder='www.starwars.com/ursister2.png'></textarea>
<br>
<p> Image for 1024 </p>
<textarea class='input1024' placeholder='www.starwars.com/urbrother1.png'></textarea>
<br>
<p> Image for 2048 </p>
<textarea class='input2048' placeholder='www.starwars.com/urbrother2_aidan_ur_awesome_sam_keep_doing_you.png'></textarea>
<br>
<p>Name this Game</p>
<textarea class='nameGame' placeholder='star wars game'></textarea>
<br>
<a class="go">Submit</a>
<br>
<br>
</div>
</div>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:700,600' rel='stylesheet' type='text/css'>
<!-- Insert these scripts at the bottom of the HTML, but before you use any Firebase services -->
<!-- Firebase App (the core Firebase SDK) is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/5.11.1/firebase-app.js"></script>
<!-- Add Firebase products that you want to use -->
<script src="https://www.gstatic.com/firebasejs/6.0.2/firebase-database.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.11.1/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.11.1/firebase-firestore.js"></script>
<script src="https://cdn.firebase.com/libs/firebaseui/3.5.2/firebaseui.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.firebase.com/libs/firebaseui/3.5.2/firebaseui.css" />
<script>
// Your web app's Firebase configuration
var firebaseConfig = {
apiKey: "AIzaSyAUwZv6XXMjz3pH-RCpvrmS4zsVY2yRVTk",
authDomain: "github-thing-85048.firebaseapp.com",
databaseURL: "https://github-thing-85048.firebaseio.com",
projectId: "github-thing-85048",
storageBucket: "github-thing-85048.appspot.com",
messagingSenderId: "443195271357",
appId: "1:443195271357:web:55a238fe25cb0a7b"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
firebase.auth().setPersistence(firebase.auth.Auth.Persistence.LOCAL)
.then(function() {
})
.catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
});
// Initialize the FirebaseUI Widget using Firebase.
var ui = new firebaseui.auth.AuthUI(firebase.auth());
ui.start('#firebaseui-auth-container', {
signInOptions: [
firebase.auth.EmailAuthProvider.PROVIDER_ID
],
// Other config options...
});
ui.start('#firebaseui-auth-container', {
signInOptions: [
// List of OAuth providers supported.
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
],
// Other config options...
});
ui.start('#firebaseui-auth-container', {
signInOptions: [
firebase.auth.PhoneAuthProvider.PROVIDER_ID
],
// Other config options...
});
var uiConfig = {
callbacks: {
signInSuccessWithAuthResult: function(authResult, redirectUrl) {
// User successfully signed in.
// Return type determines whether we continue the redirect automatically
// or whether we leave that to developer to handle.
return false;
},
uiShown: function() {
// The widget is rendered.
// Hide the loader.
document.getElementById('loader').style.display = 'none';
}
},
// Will use popup for IDP Providers sign-in flow instead of the default, redirect.
signInFlow: 'popup',
signInSuccessUrl: 'https://aidanspeakss.github.io/makeurown/#',
signInOptions: [
// Leave the lines as is for the providers you want to offer your users.
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
firebase.auth.EmailAuthProvider.PROVIDER_ID,
firebase.auth.PhoneAuthProvider.PROVIDER_ID
],
// Terms of service url.
tosUrl: 'https://aidanspeakss.github.io/makeurown/tos.html',
// Privacy policy url.
privacyPolicyUrl: 'https://aidanspeakss.github.io/makeurown/privacy.html'
};
// The start method will wait until the DOM is loaded.
ui.start('#firebaseui-auth-container', uiConfig);
</script>
<script>
firebase.initializeApp({
apiKey: 'AIzaSyAUwZv6XXMjz3pH-RCpvrmS4zsVY2yRVTk',
authDomain: 'github-thing-85048.firebaseapp.com',
projectId: 'github-thing-85048',
}, "firestore");
var db = firebase.firestore();
</script>
<script>
</script>
<script src="js/change.js"></script>
<script src="js/bind_polyfill.js"></script>
<script src="js/classlist_polyfill.js"></script>
<script src="js/animframe_polyfill.js"></script>
<script src="js/keyboard_input_manager.js"></script>
<script src="js/html_actuator.js"></script>
<script src="js/grid.js"></script>
<script src="js/tile.js"></script>
<script src="js/local_storage_manager.js"></script>
<script src="js/game_manager.js"></script>
<script src="js/application.js"></script>
</body>
</html>