Developed by Noncho Savov, FoumartGames 2019. Submission in JS13K Games. Inspired by Super Bunny by Vic Leone, DataMost Inc. 1983";u=[[[4,5,,-2,,3,,3]],[[4,5,-.5,-1,,3,,3]],[[12,4,,,3,,3,1],[12,4,,6.5,1,3,1,3],[14,4,-2,14,3,1,3],[3.5,3.5,.5,3.5,1,1,1,1,1,,1],[4,4.5,7.5,10,1,1,1,1,1,,1]],[[10,4,,14,1,1,3,3],[4.5,4,,6.6,,3,1,1],[4.5,4,5.5,7,3,,1,1],[3.5,4.5,.5,10,1,1,1,1,1,,1],[3.5,4,6,10.5,1,1,1,1,1,,1]],[[10,4,,7,3,3,1,1],[10,4,,14,1,1,3],[3.5,5,.5,17.5,1,1,2.5,,1],[3.5,4,.5,10.5,1,1,1,1,1,,1],[3.5,4,6,10.5,1,1,1,1,1,,1]],[[10,4,,7,3,3,,1],[10,4,,14,1,,3,3],[3.5,4,.5,10.5,1,1,1,1,1,,1],[4.5,3,3.5,11,1,3,3,1,,,,1]],[[4.5,4,,6.6,,3,1,1],[4.5,4,,14,1,1,3],[3.5,4.5,.5,10,1,1,1,1,1,,1],[5,4,3.5,6.6,3,,3,1,,,,1]],[],[],[[12,4,-2,,,3,1,3],[12.5,4,-.5,6.5,1,3,1,1],[14.5,4,-2.5,14,3,1,3],[4,3.5,,3.5,1,1,1,1,1,,1],[3.5,3.5,6,3.5,1,1,1,1,1,,1],[4,4.6,,10,1,1,1,1,1,,1],[3.5,4.6,8,10,1,1,1,1,1,,1]],[[10,4,,14,1,1,3,3],[4.5,4,,6.6,,3,1,1],[4.5,4,5.5,7,3,,1,1],[3.5,4.5,.5,10,1,1,1,1,1,,1],[3.5,4,6,10.5,1,1,1,1,1,,1]],[[4,5,,6,,3,,1],[7,4,3,7,3,3,1,1,,,,1],[4.5,4,,14,1,1,3,3],[4.5,5,5.5,14,1,1,,3],[3.5,4,6,10.5,1,1,1,1,1,,1],[3.5,4,.5,10.5,1,1,1,1,1,,1]],[[4,5,,6,,3,,1],[7,4,3,7,3,3,1,1,,,,1],[4.5,4,,14,1,1,3,3],[4.5,5,5.5,14,1,1,,3],[3.5,4,6,10.5,1,1,1,1,1,,1],[3.5,4,.5,10.5,1,1,1,1,1,,1]],[[4.5,4,,7,3,3,1,1],[4.5,6,5.5,5,3.5,,1,1],[10,4,,14,1,1,3,3],[3.5,4,.5,10.5,1,1,1,1,1,,1],[3.5,4,6,10.5,1,1,1,1,1,,1],[3.5,5,3.5,17.5,1,1,,2.5,1]],[[4,5,-1,-1,3,,3]],[[4,5,-.5,-2,3,,3]]];Pa(u,-13,25,7.5,"s");u=[[[7,8,4,1,,3]],[[4,5,,4,,3]],[[8,6,,3,3,3]],[[4,4,,5,3,3]],[[4,9,,,3]],[[4,9,-.2,,,3]],[[22,3,9,2,3,3,,,,,1],[36,4,,5,3,3]],[[27,4,,5,3,3]],[[5,4,,5,3,3]],[[3,8,,1,2]],[[4,10,-.5,-1,3,3]],[[5,6,,3,3]]];Pa(u,-37,272,8,"t m");Pa(u,-37,240,8,"t");u=V();c.appendChild(u);d=u.getContext("2d");U(u,990,150,3.6,1).style.letterSpacing="1.5px";w=0;a()}function Pa(a,f,u,e,d,l,m,E,L,M){for(L=0;Lp;p++)h.push(V(p,16r;r++){var e=ba.C(p,r,24,24,32,u,4,a,a==Ca[A][p],a==Ca[A][p-2]);if(!p||p>5)e.s(-1,0,0,0,V(-r-1,p&&2==r?2:0),p&&2==r?V(-r-1):0);else for(w=0;wG&&(l=775,m=135);if(!e){var E=document.createElement("canvas");E.width=l;E.height=m+1;e=E.getContext("2d");n(e,1)}if(!a&&0>G)return E;if(0>a){for(m=0;12>m;m++)for(var L=-4==a&&4>m?15-4*m:-2==a&&8A?128-8*A+Math.random()*(128+16*A)|0:162)-A*(A-1),H=Math.random()*(42-2*A)|0;16>H&&9>A&&(H=16);if(8==A||9==A)B=16+64*Math.random()|0;11==A&&(B=212);12==A&&(B=128+(128*Math.random()|0),H=128+(128*Math.random()|0));if(255A||11==A?0:255,H=10r;r++)z[p][r].l(S)}function Ta(a){if(!(0>G)){pa++;wa=va;va=1+((60-pa/60)/6|0);1>va&&(va=1);S.clearRect(156,0,gz.width-320,gz.height);for(p=1;pr;r++)z[p][r].y+=z[p][r].p,540r;r++)z[p][r].l(S);!z[N][0].p||P||y||(O+=z[N][0].p);(-40>O||500P&&(b.u(P),g&&b.b(P)),14>P&&P++,y||Y(g?13:6*k+(P/2|0))):y&&(y+=2,215+10*k&&p<90-15*k)for(t=1;t=90-15*k?(y=1,O-=100-p-w*(0.6&&k&&9>oa&&!g):(b.p(1,50,10,40),b.p(1,90,8,35,160,.05),b.p(0,90,20,30,320,.06),g=40,13==A?z[N][0].a=0:(O=z[6][2].y,K=0,ua=200+50*A,J=I),Ra(),X());else if(127&&t!=32)if(r=z[R[A][p][0]][R[A][p][1]],K!=r.d&&!r.c&&13>A){Ua();break}b.p(0,-900,45,50,0,.04);b.p(1,-200,15,50);b.p(2,0,9,40,250);b.p(1,20,20,30,300);Q=40;ua=(t-18+A+(9>oa?va:10))*20;J=I;w=0;for(t=1;tv;v++)if(z[t][v].a)if(z[t][v].q==x){if(z[t][v].a=0,13==A&&5==x){g=Q=0;z[t+1][v+1].a=V(k?0:20,k?0:3,ea);Ra();X();Y(18,"",1);setTimeout(Va,900);return}}else 17!=z[t][v].t&&36!=z[t][v].t&&w++;w||(z[6][2].h=h[19],g=0,9>oa?oa++:I+=5*A,Ra(),X(),b.b(1,20,900),b.b(2,20,900),b.b(3,20,900),b.b(4,20,900));break}t=0}t||Ua()}else Ua();else y||Y(g?12:6*k+5),P||(y=-1),X(1)}!y&&1==g&&!P&&2>Q&&Y(12);(J||va!=wa)&&X(1);ja&&requestAnimationFrame(Ta)}}function Wj(a){a&&(b.p(1,9,40,20),9>oa&&(oa++),a>1&&(I+=25*A),X());P=1}function Ua(){b.d(0);b.p(2,200,-10);ja=0;za=Wa;xa=O;ya=w=-9-O/50|0;Y(18);requestAnimationFrame(Xa)}function Xa(){xa+=ya;ya+=1;ya==w+1&&Y(6*k+1);9==ya&&Y(6*k+5);340xa&&w&&(w=b.u());U(bz,z[N][0].x+40+4*(P/2|0)*(K||-1)*7.25,xa,K||1xa?requestAnimationFrame(Xa):za()}function Va(a){ja=0;C=1;Ra();X();Z(340,90,320,320," ");Z(360,120,0,0,(a?"G A M E O V E R":"W E L L D O N E"),32,1);Y(6*k);a?U(bz,440,220):(b.d(9,90),ka=1,Z(435,190,0,0,"Powerups",24),a=(k?500:1E3),Z(440,216,0,0,oa+" * "+a,32),I+=oa*a,Z(465,260,0,0,"Lives",24),a=(k?1E3:2500),Z(440,286,0,0,G+" * "+a,32),I+=G*a);qaoa&&(g=oa=0,G--)):G--;0>G?Va(1):(Ra(),X(),Sa(),Y(g?12:6*k),P=0,Ya())}function Sa(a,f){N=g?6:0;K=g?0:1;O=z[0][2].y;b.d(a||0,f||0)}function Y(a,f,u){T.clearRect(0,0,24,25);T.drawImage(h[a],0,0);12!=a&&13!=a||T.drawImage(h[14+k],0,(pa/10|0)%2?0:12,24,12,0,2*(a-6)-12,24,12);f&&(J+=f/40|0,u&&(f=1==u?f+"":"ZAP",T.fillStyle="#fff",T.font="bold "+(1==u?7:8)+"px Lucida Console",n(T,1,1),T.fillText(f.charAt(0),8,9),T.fillText(f.charAt(1),10,15),T.fillText(f.charAt(2),12,21),n(T)))}function n(a,f,u,e){a.shadowColor=e||"#000";a.shadowOffsetY=f||0;a.shadowOffsetX=u||0}function X(a){if(!C){Z(3,63,88,26," S C O R E",14);Z(3,84,88,32);Z(42-(J||I).toString().length*6,84,0,0,J||I,22,1);Z(3,120,88,21," BONUS : "+(9>oa?va:10),13);}if(!a){Z(862,422,92,26," P O W E R",15);Z(834,442,120,92," ");n(S,2,1,"#222");for(p=0;pe.clientY/da||(0>G&&!C?Oa():0>G&&C?Za():C&&13==A&&Za())}function Ja(){P||1O||260O||260G||C||(ja?ja=0:(ja=1,requestAnimationFrame(Ta)))}function Za(){C&&13==A&&ka&&(na=k+1,ka=k=J=0);mn.style.display="block";C=0;ja=1;G=-1;A=0;Ma()}function La(a){a=a.keyCode;if(32==a||13==a)0>G&&!C?Oa():0>G&&C&&Za();39!=a&&68!=a||Ka();37!=a&&65!=a||Ja();80!=a&&27!=a||(la=0,X(),Ya());83==a&&MM();70==a&&FF();82==a&&A&&Za()};function MM(){b.v?b.v=0:(b.v=1,b.b(3,2));X()}function FF(){var f=document.documentElement;document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement?(la=0,document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()):(la=1,(f.requestFullscreen||f.mozRequestFullScreen||f.webkitRequestFullScreen||f.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)).call(f));X()}