var fat; var start; var faceX=15,faceY=5; var pitch=5; var hMax=10,wMax=10; function metabo(x,y){ lc(x,y);log(chr(143)); } function init(){ cls(); fat=0; start=tick(); lc(faceX,faceY);log(chr(235)); } function main(){ var t=(tick()-start)/1000; lc(0,0);log("time:"); lc(5,0);log(t); var fatMax=pitch*(hMax+wMax); lc(0,1);log((fat*100)/fatMax); lc(3,1);log("%"); var width=0; if(fat<=pitch*hMax){ metabo(faceX,faceY+1+fat/pitch); }else{ if(fat%pitch==0){ width=(fat-pitch*hMax)/pitch; var i=0; while(i<=hMax){ var j=0; while(j<width){ metabo(faceX+j,faceY+1+i); metabo(faceX-j,faceY+1+i); j=j+1; } i=i+1; } } } if(width>=wMax){ lc(faceX+1,faceY);log(chr(255)); lc(faceX+1,faceY-1);log(chr(158)); lc(0,20); exit(); } setTout(main,100); } function bf(b){ if(b==1) fat=fat+1; } init(); setBprs(bf); main();