var fx,fy,fv; var score,norma,start; var iNum=3; var iPos=new Array(iNum*3); function resetI(i){ if(rnd(2)==0){ iPos[i]=1; iPos[i+2]=1; }else{ iPos[i]=30; iPos[i+2]=-1; } iPos[i+1]=rnd(22)+1; } function init(){ cls(); fx=15; fy=10; fv=0; score=0; norma=5; start=tick(); var i=0; while(i<iPos.length){ resetI(i); i=i+3; } } function main(){ // draw items var i=0; while(i<iPos.length){ lc(iPos[i],iPos[i+1]);log(" "); if((iPos[i]==fx)*(iPos[i+1]==fy)){ resetI(i); score=score+1; } if((0<iPos[i])*(iPos[i]<31)){ iPos[i]=iPos[i]+iPos[i+2]; }else{ resetI(i); } lc(iPos[i],iPos[i+1]);log(chr(246)); i=i+3; } // update score and time lc(0,0);log("score:",score); lc(10,0);log("time:",(tick()-start)/100); // game clear if(score>=norma){ lc(11,11);log("Game Clear!"); lc(fx,fy);log(chr(239)); exit(); } // draw player lc(fx,fy);log(" "); if(fv<0) fv=fv+1; fy=fy+1+fv; if(fy<1) fy=1; if(fy>22) fy=22; lc(fx,fy);log(chr(236)); setTout(main,100); } function bf(b){ if(b==1){ if(fy>=22) fv=0; fv=fv-3; } } init(); setBprs(bf); main();