var time=0; var ctr=15, gnd=20; var x=15,y=2,v=1; var b_x=0,b_y=0,b_b=0; var clr=0; function isEmp(x,y){ var c=scr(x,y); if((c==0)+(c==32)) return 1; return 0; } function main(){ lc(0,0);log("time:",time); lc(x,y);log(" "); if(x<=5) v=1; if(x>=25) v=-1; x=x+v; lc(x,y);log(chr(237)); if(btn()*(b_b==0)){ b_b=1; b_x=x; b_y=y; } if(b_b==1){ lc(b_x,b_y);log(" "); b_y=b_y+1; var code=247; if(!isEmp(b_x,b_y+1)+((b_y+1)>=gnd)){ b_b=0; code=143; if(b_y<=y+1)clr=1; } lc(b_x,b_y);log(chr(code)); } if(clr==1){ lc(3,15);log("Your Tower is The Babel!!\n"); exit(); } time=time+1; setTout(main,100); } cls(); var i=0; while(i<32){ lc(i,gnd);log(chr(143)); i=i+1; } main();