function t(b){if(b==1)return~~(Math.random()*25);if(!b){var c=new k;if(c[l]()-r[l]()<3e3/o)return;r=c,a[f](56,91,84,21),t(4,0,q),t(4,1,q),q=!q}if(b==4){var g=arguments[1]?0:49,u=arguments[2]?7:~~a[e](56+g,98,14,7);a[d]=n,a[e](63+g+u,91,21,7),a[e](56+g+u,105,7,7),a[e](77+g+u,98,7,14),a[e](84+g-u*2,105-u,7,7)}if(b==5){i=9;while(i--)a[d]=i==3?n:"#181",a[e](i*56,112,49,49),a[d]=m,a[j]=3+p,a[h](String.fromCharCode(s[i]+97),i*56+10,150)}}var d="fillStyle",e="fillRect",f="clearRect",g="push",h="fillText",j="font",k=Date,l="getTime",m="#000",n="#1f3",o=0,p="0pt Monospace",q=!0,r=0;b.style.backgroundColor=m,c.width=497,c.height=168,a[d]=n,a[e](133,42,7,7),a[e](126,42,7,21),a[e](133,56,21,21),a[e](147,49,14,7),a[e](154,70,7,7),a[e](70,56,49,7),a[e](56,63,91,21),a[e](63,84,70,7),t(4,0),t(4,1);var s=[];i=9;while(i--)s[g](t(1));t(5,s),window.onkeydown=function(b){b.keyCode==s[3]+65&&(o||(r=new k,setInterval(t,20)),o++,s.splice(0,1),s[g](t(1)),a[d]=n,a[f](448,40,30,10),a[j]=1+p,a[h](o,448,50),t(5))}
(function(ctx, body, canvas) {
var __fillStyle__ = 'fillStyle';
var __fillRect__ = 'fillRect';
var __clearRect__ = 'clearRect';
var __push__ = 'push';
var __fillText__ = 'fillText';
var __font__ = 'font';
var __date__ = Date;
var __getTime__ = 'getTime';
var black = '#000';
var green = '#1f3';
var counter = 0;
var fontSize = '0pt Monospace';
var foo = true;
var date = 0;
body.style.backgroundColor = black;
canvas.width = 497;
canvas.height = 168;
ctx[__fillStyle__] = green;
// Buffalo head
ctx[__fillRect__](133, 42, 7, 7);
ctx[__fillRect__](126, 42, 7, 21);
ctx[__fillRect__](133, 56, 21, 21);
ctx[__fillRect__](147, 49, 14, 7);
ctx[__fillRect__](154, 70, 7, 7);
// Buffalo body
ctx[__fillRect__](70, 56, 49, 7);
ctx[__fillRect__](56, 63, 91, 21);
ctx[__fillRect__](63, 84, 70, 7);
// draw buffalo legs
magicFunction(4, 0);
magicFunction(4, 1);
var lettersCodes = [];
i=9;while(i--){lettersCodes[__push__](magicFunction(1))};
// draw letters
magicFunction(5, lettersCodes);
window.onkeydown = function(e) {
if (e.keyCode != lettersCodes[3] + 65) {
return;
}
if (! counter) {
// animate buffalo
date = new __date__();
setInterval(magicFunction, 20);
}
counter++;
lettersCodes.splice(0, 1);
// push random letter char code
lettersCodes[__push__](magicFunction(1));
ctx[__fillStyle__] = green;
ctx[__clearRect__](448, 40, 30, 10);
ctx[__font__] = 1 + fontSize;
ctx[__fillText__](counter, 448, 50);
// draw letters
magicFunction(5);
}
function magicFunction(funcName) {
// random char code function
if (funcName == 1) {
return ~~(Math.random() * 25);
}
// animate buffalo function
if (! funcName) {
var nowDate = new __date__();
if (nowDate[__getTime__]() - date[__getTime__]() < (3000 / counter)) {
return;
}
date = nowDate;
ctx[__clearRect__](56, 91, 84, 21);
// draw buffalo legs
magicFunction(4, 0, foo);
magicFunction(4, 1, foo);
foo = !foo;
}
// draw legs function
if (funcName == 4) {
var plus = arguments[1] ? 0 : 49;
var plus2 = arguments[2] ? 7 : ~~ctx[__fillRect__](56+plus, 98, 14, 7);
ctx[__fillStyle__] = green;
ctx[__fillRect__](63+plus+plus2, 91, 21, 7);
ctx[__fillRect__](56+plus+plus2, 105, 7, 7);
ctx[__fillRect__](77+plus+plus2, 98, 7, 14);
ctx[__fillRect__](84+plus-plus2*2, 105-plus2, 7, 7);
}
// draw letters function
if (funcName == 5) {
i=9;while(i--) {
// draw
ctx[__fillStyle__] = i == 3 ? green : '#181';
ctx[__fillRect__](i * 56, 112, 49, 49);
ctx[__fillStyle__] = black;
ctx[__font__] = 3 + fontSize;
ctx[__fillText__](String.fromCharCode(lettersCodes[i] + 97), i * 56 + 10, 150);
}
}
}
})(a, b, c);