最新下载
热门教程
- 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);
相关文章
- 《彩色点点战争》推图常用三大主c玩法详解 01-23
- 《燕云十六声》池鱼林木任务攻略 01-23
- 《大连地铁e出行》查看行程记录方法 01-23
- 《明日方舟》2025春节限定干员余角色介绍 01-23
- 《崩坏:星穹铁道》万敌光锥搭配攻略 01-23
- 《燕云十六声》一药千金任务攻略 01-23