-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.min.html
24 lines (24 loc) · 975 Bytes
/
index.min.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
<pre id=p><script>
k=98;
for (h=[a=b=c=d=e=f=g=i=0]; i < 49; ++i) h[i+49] = h[i] = ~~(Math.random()*3);
onkeyup=function(e){
e = e.keyCode;
a||(a = (e == 90 || e == 38) ? 1 : (e == 83 || e == 40) ? 2 : a);
};
(n = function(){
b = (a == 1) ? (f == 0 || f == 9) ? 2 : 3 : (a == 2) ? 0 : 1;
if (a && ++f == 10) f = a = 0;
p.innerHTML = "";
for( i = 0; i < 6; ++i ) {
m = "";
for ( j = 0; j < 98; ++j ) m += " _"[+(i==4)].repeat(20) + (["|^^^^^|",o=" | | ",o,o," V ","_______",,,,," \u039b ","__| |__"][h[j]*6+i-5]||" ");
l = ["o_<",,,," o ","/|.",",\\_",,,q=" o/",r="/|_",s="/ ",,,q,r,s][b*6+i-4];
w = m.substr(g,98);
p.innerHTML += (l ? w.substr(0,3) + l + w.substr(6) : w ) + "\n" + ((i==5) ? e : "");
}
g = ++g % 1350;
if(d == 7) d = 0, e ++, k>49&&k--;
if(g % 27 > 15 && g % 27 < 23) c = [a != 1 && d > 0, a != 2 && d > 1 && d < 5, a != 1 && d > 1 && d < 5][h[~~(g / 27)]], d ++;
c ? alert("Perdu !") : setTimeout(n,k);
})()
</script>