七行プログラミング

このエントリーをはてなブックマークに追加
792IE限定ですが
<body onKeyDown="K=event.keyCode-37"><tt id=FEX><script>var K=-1,M=1,L=0,Z=[],D=
document.all,T="",C="□",F;function R(H){while(D["F"+(F=Math.ceil(Math.random()*
399))].innerHTML!=C);I(F,H)}function Y(){if(K+1){P+=[-1,-20,1,20][K];X=D["F"+P].
innerHTML;if(X!=C)if(X!="▲"){clearTimeout(T);alert("Over");return}else{M++;R(X)
}I(Z[++L]=P,"●");I(Z[L-M],C)}T=setTimeout("Y()",99)}function I(P,H){D["F"+P].
innerHTML=H}for(i=0;i<400;i++)T+=(i%20?"":"<br>")+"<span id=F"+i+">"+((i+1)%20>1
&&i>19&&i<379?C:"■")+"</span>";I("EX",T);R("●");P=Z[0]=F;R("▲");Y();</script>