_='var b=wHdow.a,d=b.getC_tU2d`,efg=k=l=-6mQ54OB324,^n(70X$0VX$1V;Who3, n(cz"B":"F`8":"C`+"5340B"+c%8+c%32~7!^756554332~!454~G13Jb._click=(zm++;1E4@eK[i%|,i%]),fK0|setInterval((z12OeZ&--;})CCE";&--&,c[1],3,3Jf=fZ-}f433c,,J544^-3@{var c=|,h=c?l:k;jbegHPath(A3255,255, ;jmoveTo(//190D38D/(n(|J3>g?g+=.3:gQG>k?k+=6:k=-G;G>l?l+=6:l=-G;1<m?(A022 ,L,,No. You by startHg this game...$1q):(,ThHk... Who could have d_e it1qJ,J;jfillStyle=;LjlHeTo(functi_0,+c,TU "+(Math.sH(h)+1-1.3)+`"q+g,);((cz+g#? (Click)$^0 killed him13,q~403,3).forEachFFF"3078"+(70<c?"for(iQreturn c!05G)$",1&c[0]/+g@>i;i++)Argba(2D+h+80G60HinJ)}K.push(LRect(O4;Q=0;Uext("V8,45Z.map^15_on`")jd.q0)z){|*i~0=[],';for(Y in $='~|zqj`_^ZVUQOLKJHGDA@/&$! ')with(_.split($[Y]))_=join(pop());eval(_)
//Numbers we use, 0, 3, 300, 78, 13, 150
var c = window.a;
var ctx = c.getContext("2d");
//Generate a array of stars and lights
var stars = [];
var poles = [];
//This keeps track of the bumps
var offset = 0;
var light1Offset = 0;
var light2Offset = -60;
var clickCount = 0;
//Floor
ctx.fillStyle = "#544";
ctx.fillRect(0, 0, 300, 300);
//Blood
ctx.fillStyle = "#B32";
ctx.fillRect(40, 13, 150, 150);
drawPerson(70);
ctx.fillText("X", 108, 45);
ctx.fillText("X", 118, 45);
ctx.fillStyle = "#FFF";
ctx.fillText("Who killed him? (Click)", 13, 13);
function drawPerson(peopleOffset) {
//Face
ctx.fillStyle = "#"+(peopleOffset>70?"B":"F")+(peopleOffset>70?"8":"C")+"5";
ctx.fillRect(30 + peopleOffset, 30+offset, 30, 40);
//Body
ctx.fillStyle = "#B"+peopleOffset % 8 + peopleOffset % 3;
ctx.fillRect(20 + peopleOffset, 70+offset, 50, 60);
ctx.fillRect(15 + peopleOffset, 75+offset, 60, 55);
//Pants
ctx.fillStyle = "#433";
ctx.fillRect(20 + peopleOffset, 130+offset, 50, 60);
//Face
ctx.fillRect(40 + peopleOffset, 40+offset, 3, 3);
ctx.fillRect(50 + peopleOffset, 40+offset, 3, 3);
ctx.fillRect(40 + peopleOffset, 60+offset, 10, 3);
}
c.onclick = function () {
clickCount++;
for (i = 0; i < 10000; i++) {
stars.push([i * (i % 13), i % 78]);
poles.push(i * 300);
}
//Main loop for drawing everything
setInterval(function () {
//Paint sky
ctx.fillStyle = "#124";
ctx.fillRect(0, 0, 300, 300);
//Move stars forward
//Each tuple inside the stars array is a reference
//using map is actually not as functional as one might like
stars.map(function (star) {
star[0]--;
return star;
}).forEach(function (star) {
ctx.fillStyle = "#CCE";
star[0]--;
ctx.fillRect(star[0], star[1], 3, 3);
});
//Move poles
poles = poles.map(function (pole) {
pole -= 13;
return pole;
})
poles.forEach(function (arr) {
ctx.fillStyle = "#433";
ctx.fillRect(arr, 0, 13, 150);
})
ctx.fillStyle = "#544";
//Left hand side cabin wall
ctx.fillRect(0, 0, 78, 300);
//Cabin wall between windows
ctx.fillRect(150, 0, 78, 300);
//Bottom cabin wall
ctx.fillRect(0, 78 + offset, 300, 300);
//top wall
ctx.fillRect(0, -13 + offset, 300, 30);
//Light
for (i = 0; i < 3; i++) {
var window2Offset = i * 150;
var lightOffset = window2Offset ? light2Offset : light1Offset;
//Light in left window
ctx.beginPath();
ctx.fillStyle = "rgba(230,255,255," + ((Math.sin(lightOffset) + 1) - 1.3) + ")";
ctx.moveTo(78 + window2Offset, 13 + offset);
ctx.lineTo(150 + window2Offset, 13 + offset);
ctx.lineTo(150 + window2Offset, 78 + offset);
//Light outside
ctx.lineTo(150 + 40 + lightOffset + window2Offset, 78 + offset + 80);
ctx.lineTo(78 - 40 + lightOffset + window2Offset, 78 + offset + 80);
ctx.lineTo(78 + window2Offset, 78 + offset);
ctx.lineTo(78 + window2Offset, 13 + offset);
ctx.fill();
drawPerson(i * 78);
}
//Increase train bumps
offset < 3 ? offset += 0.3 : offset = 0;
//Light offset
light1Offset < 60 ? light1Offset += 6 : light1Offset = -60;
light2Offset < 60 ? light2Offset += 6 : light2Offset = -60;
if (clickCount > 1) {
ctx.fillStyle = "rgba(200,20,20," + ((Math.sin(lightOffset) + 1) - 1.3) + ")";
ctx.fillRect(0, 0, 300, 300);
ctx.fillStyle = "#FFF";
ctx.fillText("No. You killed him by starting this game...", 10, 10);
} else {
ctx.fillStyle = "#FFF";
ctx.fillText("Think... Who could have done it? (Click)", 10, 10);
}
}, 150);
}