教程中国
PHOTOSHOP CS9.0中文版 MAYA 8.5 FOR WINDOWS Corel Painter v9.0 Flash MX2004 中文版 Illustrator cs2 中文版
VC++6.0含sp6 中英文版 VB6.0 +sp6 简体中文版 Borland Delphi 7汉化版 MSDN for vb6.0中文版 Visual Studio 2005简体
教程中国下属 文件存储共享专家BIBIDU.COM 提供大型软件,教材,源码,电影,音乐,图书等下载 更多精品请点此进入
  您目前所在位置: 教程中国 >> 编程基地 >> ASP >> 用ASP编写的俄罗斯方块游戏 RSS订阅
用ASP编写的俄罗斯方块游戏
用ASP编写的俄罗斯方块游戏(5)
教程(视频,书籍)下载:  ASP.NET AutoCAD 数据库 C# ASP java photoshop 网页设计 delphi 3dmax Flash C++ VB 张孝祥 实例   更多请进入BIBIDU搜索
IT搜索引擎   
End Function
Sub ColorForm()
For i = 0 To 11:document.all("P" & cstr(i)).bgcolor = "#000000":Next
For i = 0 To 249:document.all(cstr(i)).bgcolor = "#000000":Next
End Sub
function Andar()
For i = 1 To 4
For i2 = 1 To 4
If s(i, i2) = True And Y - i2 + 1 = 1 Then Fig = 0
If Y - i2 > 0 And X + i - 1 > 0 And X + i - 1 < 11 Then
If s(i, i2) = True And n(X + i - 1, Y - i2) = True Then Fig = 0
End If
Next
Next
If Fig = 0 Then
For i = 1 To 4
For i2 = 1 To 4
If s(i, i2) = True Then n(X + i - 1, Y - i2 + 1) = True
Next
Next
Ner
Nyfig
Else
For i = 1 To 4
For i2 = 1 To 4
If s(i, i2) = True And s(i, i2 - 1) = False Then
document.all(cstr(coor(X + i - 1, Y - i2 + 1))).bgcolor = "#000000"
End If
Next
Next
End If
Y = Y - 1
For i = 1 To 4
For i2 = 1 To 4
If s(i, i2) = True Then
if not gover = true then
If ucase(document.all(cstr(coor(X + i - 1, Y - i2 + 1))).bgcolor) <> "#000000" And ucase(document.all(cstr(coor(X + i - 1, Y - i2 + 1))).bgcolor) <> Farg Then
Gameover
end if
end if
End If
If s(i, i2) = True Then
document.all(cstr(coor(X + i - 1, Y - i2 + 1))).bgcolor = Farg
End If
Next
Next
end function
Sub Gameover()
MsgBox "游戏结束!", , "俄罗斯方块"
window.clearInterval Timer1
GOver = true
End Sub
Sub Ner()
Score = Score + 10
document.all("Sco02").innertext = Score
For i2 = 25 To 1 Step -1
ok = 1
For i = 1 To 10
If n(i, i2) = False Then ok = 0
Next
If ok = 1 Then
Score = Score + 150
document.all("Sco02").innertext = Score
For i = 1 To 10
For i3 = i2 To 24
n(i, i3) = n(i, i3 + 1)
document.all(cstr(coor(i, i3))).bgcolor = document.all(cstr(coor(i, i3 + 1))).bgcolor
Next
Next
End If
Next
End Sub
Function coor(xx, yy)
coor = (yy - 1) * 10 + xx - 1
End Function
Sub Rota()
Rot2 = Rot + 1
If Rot2 = 5 Then Rot2 = 1
If (Fig = 2 Or Fig > 5) And Rot2 = 3 Then Rot2 = 1
For i = 1 To 4
For i2 = 1 To 4
s3(i, i2) = 0
Next
Next
Select Case Fig
Case 2
Select Case Rot2
Case 1:s3(1, 2) = True:s3(2, 2) = True:s3(3, 2) = True:s3(4, 2) = True
Case 2:s3(2, 1) = True:s3(2, 2) = True:s3(2, 3) = True:s3(2, 4) = True
End Select
Case 3
Select Case Rot2
Case 1:s3(2, 1) = True:s3(3, 1) = True:s3(3, 2) = True:s3(3, 3) = True
Case 2:s3(4, 1) = True:s3(4, 2) = True:s3(3, 2) = True:s3(2, 2) = True
Case 3:s3(3, 3) = True:s3(2, 3) = True:s3(2, 2) = True:s3(2, 1) = True
Case 4:s3(2, 2) = True:s3(2, 1) = True:s3(3, 1) = True:s3(4, 1) = True
End Select
Case 4
Select Case Rot2
Case 1:s3(3, 1) = True:s3(2, 1) = True:s3(2, 2) = True:s3(2, 3) = True
Case 2:s3(2, 1) = True:s3(3, 1) = True:s3(4, 1) = True:s3(4, 2) = True
Case 3:s3(3, 1) = True:s3(3, 2) = True:s3(3, 3) = True:s3(2, 3) = True
Case 4:s3(2, 1) = True:s3(2, 2) = True:s3(3, 2) = True:s3(4, 2) = True
End Select
Case 5
Select Case Rot2
Case 1:s3(3, 1) = True:s3(3, 2) = True:s3(3, 3) = True:s3(2, 2) = True
Case 2:s3(3, 1) = True:s3(2, 2) = True:s3(3, 2) = True:s3(4, 2) = True
Case 3:s3(2, 1) = True:s3(2, 2) = True:s3(2, 3) = True:s3(3, 2) = True
Case 4:s3(2, 1) = True:s3(3, 1) = True:s3(4, 1) = True:s3(3, 2) = True
End Select
Case 6
Select Case Rot2
Case 1:s3(2, 1) = True:s3(2, 2) = True:s3(3, 2) = True:s3(3, 3) = True
Case 2:s3(2, 2) = True:s3(3, 2) = True:s3(3, 1) = True:s3(4, 1) = True
End Select
Case 7
Select Case Rot2
Case 1:s3(3, 1) = True:s3(3, 2) = True:s3(2, 2) = True:s3(2, 3) = True
Case 2:s3(2, 1) = True:s3(3, 1) = True:s3(3, 2) = True:s3(4, 2) = True
End Select
End Select
ok = 1
For i = 1 To 4
For i2 = 1 To 4
If s3(i, i2) = True Then
If X + i - 1 < 1 Or X + i - 1 > 10 Or Y - i2 + 1 < 1 Then ok = 0
If ok = 1 Then
If n(X + i - 1, Y - i2 + 1) = True Then ok = 0
End If
End If
Next
Next
If ok = 0 Then Exit Sub
Rot = Rot2
For i = 1 To 4
For i2 = 1 To 4
If s3(i, i2) = True And s(i, i2) = False Then
document.all(cstr(coor(X + i - 1, Y - i2 + 1))).bgcolor = Farg
End If
If s3(i, i2) = False And s(i, i2) = True Then
document.all(cstr(coor(X + i - 1, Y - i2 + 1))).bgcolor = "#000000"
End If
s(i, i2) = s3(i, i2)
Next
Next
End Sub
Sub document_onkeydown
If window.event.keyCode = 27 Then msgbox "Pause",,"TET"
If window.event.keyCode = 80 Or window.event.keyCode = 114 Then iniciar("d")
If window.event.keyCode = 113 Then iniciar("i")
If Not Pausa = True Then
If window.event.keyCode = 38 And Fig > 1 Then Rota
If window.event.keyCode = 37 Then
ok = 1
For i = 1 To 4
For i2 = 1 To 4
If s(i, i2) = True And X + i - 1 - 1 > 0 Then
If n(X + i - 1 - 1, Y - i2 + 1) = True Then ok = 0

来源:
作者:
关键字:用ASP编写,俄罗斯方块游戏
发表日期:2007-1-15 9:48:05

网页显示有限 阅读全文请下载本文完整版WORD文档

上一篇:HTMLEncode 方法对HTML 编码应用实例    下一篇:在ASP中使用事务控制


共6页 9 7 [1] [2] [3] [4] [5] [68 :>

2009-1-9 20:44:24
本文的相类似文章
  • 用ASP编写的俄罗斯方块游戏
  • 用ASP编写网上调查投票系统
  • 用ASP编写网络传呼机
  • 如何用ASP编写网站统计系统
  • 用ASP编写邮件列表
  • Tc2.0编写俄罗斯方块游戏
  • 用asp编写文档搜索页面
  • 利用ASP编写动态回复表单
  • 用ASP编写的俄罗斯方块游戏
  • 以前收集的一些资料---使用ASP编写农历算法(二)
  • 在学习中进步 在进步中成长 教程中国相随您的成长之路
    华腾联合科技股份有限公司版权所有
    广告联系:Rosibo@163.com