最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
一个javascript脚本写的俄罗斯方块 (2)Russia.js
时间:2022-06-30 09:52:25 编辑:袖梨 来源:一聚教程网
var Cols = 10, Rows = 20, Sqlen = 16;
var Color = new Array(8);
var delLine = new Array();
var CLoc = new Array();
var RLoc = new Array();
var CurSq,NextSq;
var type=-1,oldtype;
var delay = new Array(600,500,400,300,200,100,90,80,70);
var TimerID;
var pos = 0,end,level=0,score=0,lines=0;
var isOver=false,isPause=false;
Color[0] = "#d0d0d0";
Color[1] = "red";
Color[2] = "green"
Color[3] = "cyan";
Color[4] = "yellow";
Color[5] = "orange";
Color[6] = "pink";
Color[7] = "blue";
function GameArea(row,col,name){
var s = "";
";
return s;
}
function Init(){
GameBody.innerHTML = GameArea(Rows,Cols,'Main');
GameForecast.innerHTML = GameArea(4,4,'Forecast');
}
function Square(cols,rows,color){
this.rows = rows;
this.cols = cols;
this.color = color;
}
function chooseSquare(type,x,y){
var sq = new Array(4);
switch(type){
case 0:
sq[0] = new Square(x-1,y,1);
sq[1] = new Square(x,y,1);
sq[2] = new Square(x+1,y,1);
var Color = new Array(8);
var delLine = new Array();
var CLoc = new Array();
var RLoc = new Array();
var CurSq,NextSq;
var type=-1,oldtype;
var delay = new Array(600,500,400,300,200,100,90,80,70);
var TimerID;
var pos = 0,end,level=0,score=0,lines=0;
var isOver=false,isPause=false;
Color[0] = "#d0d0d0";
Color[1] = "red";
Color[2] = "green"
Color[3] = "cyan";
Color[4] = "yellow";
Color[5] = "orange";
Color[6] = "pink";
Color[7] = "blue";
function GameArea(row,col,name){
var s = "
" |
return s;
}
function Init(){
GameBody.innerHTML = GameArea(Rows,Cols,'Main');
GameForecast.innerHTML = GameArea(4,4,'Forecast');
}
function Square(cols,rows,color){
this.rows = rows;
this.cols = cols;
this.color = color;
}
function chooseSquare(type,x,y){
var sq = new Array(4);
switch(type){
case 0:
sq[0] = new Square(x-1,y,1);
sq[1] = new Square(x,y,1);
sq[2] = new Square(x+1,y,1);
相关文章
- 《夜族崛起》铁匠西里尔位置一览 05-17
- 《寓言之地》1.02更新内容一览 05-17
- 《辐射4》steam好评率介绍 05-17
- 《夜族崛起》技能强化珠宝掉落说明 05-17
- 《辐射4》主机控制台介绍 05-17
- 《星露谷物语》海草和绿藻获取方法 05-17