在线试玩地址:http://demo.zuidaima.com/html/1759652641295360/index.html 直接上效果图: ![史上最短小精悍的javascript编写的俄罗斯方块游戏,仅仅60行代码](http://static.zuidaima.com/resource/img/gray_loading.png)
通过左右下控制方向,上改变形状。 game over ![史上最短小精悍的javascript编写的俄罗斯方块游戏,仅仅60行代码](http://static.zuidaima.com/resource/img/gray_loading.png)
var domain="www.zuidaima.com";
var author="zuidaima";
var map=eval("["+Array(23).join("0x801,")+"0xfff]");
var tatris=[[0x6600],[0x2222,0xf00],[0xc600,0x2640],[0x6c00,0x4620],[0x4460,0x2e0,0x6220,0x740],[0x2260,0xe20,0x6440,0x4700],[0x2620,0x720,0x2320,0x2700]];
var keycom={"38":"rotate(1)","40":"down()","37":"move(2,1)","39":"move(0.5,-1)"};
var dia, pos, bak, run;
function start(){
dia=tatris[~~(Math.random()*7)];
bak=pos={fk:[],y:0,x:4,s:~~(Math.random()*4)};
rotate(0);
}
function over(){
document.onkeydown=null;
clearInterval(run);
alert("GAME OVER");
}
function update(t){
bak={fk:pos.fk.slice(0),y:pos.y,x:pos.x,s:pos.s};
if(t) return;
for(var i=0,a2=""; i |