Javascript clone of the classic worm / nibbles game. You are a black dragon hungry for dwarves. (The elusive magenta colored dwarves are healthier to eat - they don't count towards your score, but t…
with(Math)(function(u,t,w,z){function v(){return{x:46*t()+2,y:46*t()+2}}function x(s,t){with(c)fillStyle=t,fillText('☻',s.x*e,s.y*e)}function y(s){l=s%2;k=l-1;2>s?l=-l:k=-k;return{x:k,y:l}}d={x:25,y:25,d:1,n:0};f=0;g=4;addEventListener("keydown",function(s){r=s.keyCode-37;0<=r&&4>r&&(d={x:d.x,y:d.y,d:r,n:d})},1);h=setInterval(function(){with(c){lineCap=lineJoin="round";lineWidth=e=z(b.clientHeight,b.clientWidth)/50;clearRect(0,0,a.width,a.height);font=u(2*e)+"px monospace";fillStyle="blue";fillText(f,2*e,48*e);x(i,"red");j?0.003>t()?j=0:x(j,"magenta"):0.001>t()&&(j=v());strokeStyle=h?"":"red";beginPath();moveTo(d.x*e,d.y*e);o=g+2*f;for(n=d;n&&0<o;n=n.n)n.n&&(p=w(n.x-n.n.x)+w(n.y-n.n.y),p<o?(lineTo(n.n.x*e,n.n.y*e),o-=p):n.n=0),n.n||(m=y(n.d),lineTo((n.x-m.x*o)*e,(n.y-m.y*o)*e));stroke();strokeRect(e/2,e/2,49*e,49*e);h&&(m=y(d.d),d.x+=m.x/3,d.y+=m.y/3,q=getImageData(u((d.x+m.x/2)*e),u((d.y+m.y/2)*e),1,1).data,q[3]&&(q[0]?q[2]?(j=0,g--):(i=v(),f++):q[2]||(h=0)))}},32);i=v();j=0})(round,random,abs,min);
d2l0aChNYXRoKShmdW5jdGlvbih1LHQsdyx6KXtmdW5jdGlvbiB2KCl7cmV0dXJue3g6NDYqdCgpKzIseTo0Nip0KCkrMn19ZnVuY3Rpb24geChzLHQpe3dpdGgoYylmaWxsU3R5bGU9dCxmaWxsVGV4dCgn4pi7JyxzLngqZSxzLnkqZSl9ZnVuY3Rpb24geShzKXtsPXMlMjtrPWwtMTsyPnM/bD0tbDprPS1rO3JldHVybnt4OmsseTpsfX1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