-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathglitchcon_minified.html
1 lines (1 loc) · 4.94 KB
/
glitchcon_minified.html
1
<style>*{margin:0;padding:0;box-sizing:border-box;}canvas{width:100%;height:100%}</style><canvas id='C' style='background:#000;'><script>eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('o c=C.35("2d"),R=l.H,1p=1n.1m(),11=1J 2E(),i,j,k=[],7=[],v=[];C.M=1B.2p;C.P=1B.2o;c.2n=\'2l 2g\';c.2f=\'2c\';c.23=\'1Z\';g 1Q(){w(o i=0;i<k.z;i+=1){k[i].F=7[l.D(l.H()*7.z)]}}g 1L(){w(o i=0;i<7.z;i+=1){7[i].p=7[i].p==1?2:7[i].p==2?1:7[i].p}}g 1F(){o a=[\'#2Q\',\'#2O\',\'#2L\',\'#2K\',\'#2H\',\'#2A\'];C.2y.2r=a[l.D(l.H()*a.z)]}g 19(){1F();1Q();1L();h(l.H()<0.8){2b(19,l.H()*27+24)}}1X(g(){Y(Z,l.H()*1W+2M).1e();19()},28+l.H()*2z);g Y(f,d){w(o t=0,s=\'2i \'+2k(\'2q\')+\'1r\';++t<d;){s+=2B.2J(f(t))}u 1J 2R(\'1r:2S/2U;2X,\'+31(s))}g 34(t){u(l.1V(t/(t>>9))*10)&J}g Z(t){u(l.1Y(t/(t>>3))*26)&J}g X(a,b,c,d){u l.2h(l.1A(a-c,2)+l.1A(b-d,2))}g 1g(x,y,p){u X(p.x,p.y,x,y)<p.r}g 1u(n){o i,s=[30,2C,2D,2F],m=s.2I(-1)[0];g 1a(){o x=R()*(C.M-m*2)+m,y=R()*(C.P-m*2)+m,p=x<C.M*0.5&&y<C.P*0.5?1:x>C.M*0.5&&y>C.P*0.5?2:0;u{e:10,p:p,r:s[l.D(R()*s.z)],x:x,y:y}}g 1C(q,p){w(i=0;i<p.z;i+=1){h(X(q.x,q.y,p[i].x,p[i].y)<((q.r+p[i].r)*1.5)){u B}}u 1D}g 1E(p,q){2T(!1C(q=1a(),p)){q=1a()}u q}o p=[];w(i=0;i<n;i+=1){p.G(1E(p))};u p}g S(p,q){w(o i=0,n=l.D(p.e*0.5);i<l.2Y(n,p.e);i+=1){k.G({1b:p,p:p.p,1N:R()*0.8-0.4,1R:R()*0.8-0.4,F:q,x:p.x+R()*p.r-p.r/2,y:p.y+R()*p.r-p.r/2});p.e-=1}}g 1T(s){h(s.1b==s.F){u s.F}w(o i=0;i<7.z;i+=1){h(7[i]!=s.1b&&(7[i].p!=s.p||7[i]==s.F)&&1g(s.x,s.y,7[i])){u 7[i]}}u 1q}g 1c(){o b=B,A;h(1n.1m()-1p>21){1p=1n.1m();b=1D}c.22(0,0,C.M,C.P);w(o i=0;i<7.z;i+=1){c.O();c.1s(7[i].x,7[i].y,7[i].r,0,2*l.1t,B);c.1d=7[i].p==0?\'#1U\':7[i].p==2?\'#29\':\'#2a\';c.1v();c.1d=\'T(J,J,J,0.8)\';c.2e(7[i].e,7[i].x,7[i].y);h(b&&7[i].p!=0){h(7[i].e<7[i].r){7[i].e=l.D(7[i].e+7[i].r/30)}K{7[i].e-=1}}}h(b){h(!7.17(g(p){u p.p==2})&&!k.17(g(s){u s.p==2})){Y(Z,1w).1e();1M("2j 1x");15()}K h(!7.17(g(p){u p.p==1})&&!k.17(g(s){u s.p==1})){Y(Z,1w).1e();1M("2m 1x");15()}}w(o i=0;i<k.z;i+=1){o e=k[i].x,14=k[i].y,13=k[i].F.x,W=k[i].F.y,d=X(e,14,13,W),1y=(13-e)/d,1z=(W-14)/d,a=l.2s(W-14,13-e);k[i].x+=1y*3+k[i].1N;k[i].y+=1z*3+k[i].1R;c.2t();c.2u(k[i].x,k[i].y);c.2v(a);c.1d=k[i].p==2?\'#2w\':\'#2x\';c.O();c.1f(0,0);c.V(-16,-6);c.V(-16,6);c.1h();c.1v();c.O();w(o j=0;j<4;j+=1){c.1i=\'T(J,\'+l.D(E+R()*E)+\',0,\'+R()+\')\';c.1f(-16,0);c.V(R()*-10-25,R()*8-4);c.1j()}c.2G();h(A=1T(k[i])){h(A.p==k[i].p){A.e+=1;v.G({f:10,r:A.r,t:1,x:A.x,y:A.y})}K h(A.p!=k[i].p){A.e-=1;h(A.e==0){A.p=0}K h(A.e<0){A.p=k[i].p}v.G({f:10,t:0,x:k[i].x,y:k[i].y})}k.1G(i,1)}}w(o i=0;i<v.z;i+=1){h(v[i].t==0){c.1i=\'T(J,\'+l.D(E+R()*E)+\',0,\'+(R()*0.33+0.1H)+\')\';c.1I=2;c.O();c.1f(v[i].x+R()*20-10,v[i].y+R()*20-10);w(o j=0;j<3;j+=1){c.V(v[i].x+R()*20-10,v[i].y+R()*20-10)}c.1h();c.1j()}K h(v[i].t==1){c.1i=\'T(E,E,\'+l.D(E+R()*E)+\',\'+(R()*0.33+0.1H)+\')\';c.1I=2;c.O();c.1s(v[i].x,v[i].y,v[i].r+R()*5,0,2*l.1t,B);c.1h();c.1j()}h(--v[i].f<0){v.1G(i,1)}}h(b){1K(7,2)}2N(1c)}g 1k(a,b){w(o i=0;i<7.z;i+=1){h(1g(a[0],a[1],7[i])&&b.2P(7[i].p)!==-1){u 7[i]}}u 1q}g 1l(e){u[e.U?e.U[0].1O:e.1O,e.U?e.U[0].1P:e.1P]}g N(e){e.2V();o a=1k(1l(e),[1]);h(a){11.2W(a)}}g 1o(e){o a=1k(1l(e),[0,1,2]);h(a){w(o p 1S 11){S(p,a)}}11.2Z()}g 1K(c,d){o e=[],I=[],Q=[];c.32(g(p){h(p.p==0){e.G(p)}K h(p.p==d){I.G(p)}K h(p.p!=d){Q.G(p)}});I.18(g(a,b){u b.e-a.e});Q.18(g(a,b){u a.e-b.e});e.18(g(a,b){u a.e-b.e});h(I.z>0&&Q.z>0&&I[0].e>10){S(I[0],Q[0])}h(e.z>0){w(o p 1S I){h(p.e>20){S(p,e[0])}}}}g 15(){7=1u(12);k=[]}C.L(\'36\',N,B);C.L(\'37\',N,B);C.L(\'38\',N,B);C.L(\'39\',N,B);C.L(\'3a\',1o,B);C.L(\'3b\',1o,B);15();1c();',62,198,'|||||||planets|||||||||function|if|||ships|Math|||var||||||return|sfx|for|||length|pc|false||floor|99|to|push|random|myPlanets|255|else|addEventListener|width|dragmove|beginPath|height|enemyPlanets||sendShips|rgba|changedTouches|lineTo|y2|dist|synth|s_glitch||selectedPlanets||x2|y1|newGame||find|sort|flippyDiDoo|randPlanet|from|gameLoop|fillStyle|play|moveTo|inPlanet|closePath|strokeStyle|stroke|planetOnPosition|pos|now|Date|drop|tick|null|data|arc|PI|generatePlanets|fill|6000|wins|dx|dy|pow|window|isGoodPlanet|true|newPlanet|flipBackground|splice|66|lineWidth|new|aiMove|flipPlanets|alert|rdx|pageX|pageY|reassignShips|rdy|of|shipCollision|999|sin|5000|setInterval|tan|middle||1000|clearRect|textBaseline|50||666|150|8000|900|090|setTimeout|center||fillText|textAlign|Helvetica|sqrt|RIFF_oO_WAVEfmt|Green|atob|18px|Red|font|innerHeight|innerWidth|EAAAAAEAAQBAHwAAQB8AAAEACAA|background|atan2|save|translate|rotate|d00|0d0|style|12000|F0F|String|60|90|Set|120|restore|777|slice|fromCharCode|FFF|FF0|4000|requestAnimationFrame|0FF|indexOf|000|Audio|audio|while|wav|preventDefault|add|base64|min|clear||btoa|forEach||s_gameOver|getContext|touchstart|mousedown|touchmove|mousemove|touchend|mouseup'.split('|'),0,{}))</script>