Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c.height=c.width=W=255
- c.style.border='4px solid #000'
- V=3
- s=t=L=U=0
- u={38:-2,40:2,37:-1,39:1}
- h=X=10
- Y=125
- with([])with(Math)with(a)K=r=random,P=function(x,y){x=(x+~~y*W)*4
- for(y=1;y<5;)I.data[x++]=y++>>2?W:9},S=function(x,y,p){for(J=0;J++<56;)p&1&&P(x+J%8,y+J/8),p/=2},onkeydown=function(e){v=u[e.which]
- v?v&1?L=v:U=v:h&&(h=0,t=X+8,b=Y+1)},onkeyup=function(e){v=u[e.which]
- v?v&1?L=0:U=0:0},setInterval(function(){X+=L
- Y+=U
- I=createImageData(W,W)
- for(i=V;i>0;)S(W-i--*10,245,Z=0x3F6DFFBF12720C);S(X,Y,Z);h||P(t,b,h=(t+=4)>251)
- forEach(function(v,i){S(x=--v[0],y=v[1],G);x<1|x-X>=0&x-X<8&abs(y-Y)<8?splice(i,1)+V--+(K=function(){fillStyle="red"
- fillRect(0,0,W,W)
- fillStyle='#000'
- K=r}):h|x-t<0|x-t>9|b-y<0|b-y>9?0:h=splice(i,1)+(++s%20||++V)})
- V>0&&S(2,3,G=0x607E416AD57E60)+putImageData(I,0,0)+fillText(s,15,10);K((g=length<4&r()>.93&&25+(r()*25<<3))&&push([246,g]))},70)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement