-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.htm
More file actions
273 lines (261 loc) · 8.21 KB
/
index.htm
File metadata and controls
273 lines (261 loc) · 8.21 KB
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="et" lang="en">
<head>
<title>MemoryMaze - Memory game to match up similar pair of blocks</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<META NAME="author" CONTENT="Arun David, Boobalan">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<META NAME="description" CONTENT="Memory Maze is a small game to match up similar pair of blocks as quick as you can.">
<script src='jquery.min.js' type='text/javascript' language='javascript'></script>
<script language='javascript'>
var order=[0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7];
shuffle = function(o){
for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
return o;
};
function loadFunc(){
order=shuffle(order);
for(var i=0;i<16;i++){
$('#ad_gameouter').html($('#ad_gameouter').html()+"<div class='ad_blockouter'><img src='images/"+order[i]+".png' class='ad_image'/><img src='images/block.png' class='ad_block' id='ad_block"+i+"' onclick='openBlock("+i+");'/></div>");
}
}
function closeBlocks(){
$('.ad_block').fadeOut('slow');
setTimeout("$('.ad_block').fadeIn('slow');",2000);
}
var clickno=1,openedid,blocktemp,enabled=1,completecount=0;
function openBlock(blockid){
if(appStarted==1&&enabled==1){
blocktemp=blockid;
if(clickno==1){
$("#ad_block"+blockid).hide(500);
openedid=blockid;
clickno=2;
}else{
if(order[blockid]==order[openedid]){
$("#ad_block"+blockid).hide(500);
completecount++;
if(completecount==8){
stopApp();
stopTimer();
}
}else{
$("#ad_block"+blockid).hide(500);
enabled=0
setTimeout("$('#ad_block'+blocktemp).show(300);$('#ad_block'+openedid).show(300);enabled=1;",300);
}
clickno=1;
}
}
}
var appStarted=false;
var appCompleted=false;
var currentKey=97;
var timer=0;
var runTimer=false;
function startApp(){
if(appCompleted==false){
startCountdown();
}
}
var countdown=3;
function startCountdown(){
if(countdown==0){
$('#timer').html("Started");
closeBlocks();
setTimeout("appStarted=true;runTimer=true;startTimer();",2000);
}else{
$('#timer').html(countdown+"");
countdown--;
setTimeout("startCountdown();",1000);
}
}
function stopApp(){
appCompleted=true;
$('#ad_completed').html("<div class='section'>Completed !. Your time is "+$('#timer').html()+" seconds.<br/><a href='http://demo.tinywall.net/memorymaze/'>Click here</a> to retry.</div>");
setTimeout("ksPostStatus('"+$('#timer').html()+"');",2000);
}
var sec=0,milsec=0;
function startTimer(){
if(runTimer==true){
if(milsec==100){
milsec=0;
sec++;
}
$('#timer').html(zeroPad(sec,2)+"."+zeroPad(milsec,2));
milsec++;
setTimeout("startTimer()",10);
}
}
function zeroPad(num,count)
{
var numZeropad = num + '';
while(numZeropad.length < count) {
numZeropad = "0" + numZeropad;
}
return numZeropad;
}
function stopTimer(){
runTimer=false;
}
</script>
<style type="text/css">
#ad_container{
width:600px;
margin: 0 auto;
}
#ad_startbutton{
cursor:pointer;
margin-top:10px;
}
#ad_logocaption{
position:absolute;
top:80px;
left:210px;
color:#787878;
}
.clear{
clear:both;
}
#ad_gameouter{
width:300px;
height:300px;
margin-left:150px;
margin-top:30px;
}
.ad_blockouter{
width:75px;
height:75px;
float:left;
}
.ad_image{
position:absolute;
}
.ad_block{
position:absolute;
cursor:pointer;
}
#timer{
text-align:center;
font-size:30px;
color: #AE5F48;
margin-top: 10px;
}
#ad_completed{
text-align:center;
font-size:23px;
margin-top:10px;
color:#AE5F48;
}
#ad_completed a{
text-align:center;
font-size:23px;
margin-top:10px;
color:#AE5F48;
}
body{
margin: 80px 0;
background: rgba(174, 95, 72, 0.15);
font-family: arial;
padding-top: 0px;
font:"Helvetica Neue", Arial, sans-serif;
}
.container {
width: 800px;
margin: 0 auto;
}
.header{
text-align: center;
}
h1.title {
font-size: 50px;
font-weight: bold;
color: #AE5F48;
margin: 0px;
}
h5.description{
margin-bottom: 0px;
font-weight: normal;
font-size: 14px;
color: #999;
}
.start-button {
display: inline-block;
background: #AE5F48;
border-radius: 3px;
margin-top: 10px;
padding: 0 20px;
color: #f9f6f2;
height: 40px;
line-height: 42px;
cursor: pointer;
text-align: center;
}
.section {
background: #ffffff;
border: 1px solid #dddddd;
margin-top: 20px;margin-bottom: 20px;
padding: 20px;
}
.subtitle{
font-size: 20px;
font-weight: bold;
color: #AE5F48;
margin-top: 0;
}
.share{
margin-top: 30px;
text-align: center;
}
.fb-share{
width: 150px;float: left;
}
</style>
</head>
<body onload="loadFunc()">
<div style="position:fixed;top:0px;left:0px;width:0;height:0;" id="memorymaze"></div>
<a href="https://github.com/tinywall/memorymaze/">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub">
</a>
<div class="container">
<div class="header">
<h1 class="title">MemoryMaze</h1>
<h5 class="description">Small game to test your memory. Wanna try?<br><br>Match up similar pair of block as fast as possible.</h5>
</div>
<div id='ad_container'>
<div id="ad_gameouter"></div>
<div align="center">
<div class="start-button" onclick='startApp();$(this).hide();'>Start Game</div>
</div>
<div id='timer'></div>
<div id='ad_completed'></div>
</div>
<div class="share">
<a href="https://twitter.com/share" class="twitter-share-button" data-via="tinywallinfo">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<a href="https://twitter.com/tinywallinfo" class="twitter-follow-button" data-show-count="false">Follow @Tinywall</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<div class='fb-share'>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=534047313395875&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="http://demo.tinywall.net/memorymaze/" data-width="100" data-layout="standard" data-action="like" data-show-faces="true" data-share="true">
</div>
</div>
<iframe src="http://ghbtns.com/github-btn.html?user=tinywall&repo=memorymaze&type=watch&count=true" height="30" width="118" frameborder="0" scrolling="0" style="width:118px; height: 21px;margin-left:25px;" allowtransparency="true"></iframe>
</div>
<div style='clear:both;'></div>
<div class="section section1 scrollzip isShown animated bounceInLeft" style="visibility: visible;"><h2 class="subtitle">Memory Maze</h2>
It is a simple time passer and brain challenger. In this game, you have to match up similar pair of blocks as quick as you can.
<div class="clear"></div>
<br>
Memory Maze is developed by <a href="http://twitter.com/arndvd" target='_blank'>Arun David</a> & <a href="http://twitter.com/trendchaser4u" target='_blank'>Boobalan</a> in the <a href="http://www.doparttime.com" target='_blank'>DoPartTime.com</a> team.
</div>
</div>
</body>
</html>