手机站
网通分站
电信主站
密 码:
用户名:
热门关键字:  虚拟主机  cn域名  asd  ddd  域名注册
当前位置 : 主页>网络编程>Asp编程>列表

用ASP编写的俄罗斯方块游戏

来源:互联网 作者:west263.com 时间:2008-02-23 点击:
西部数码-全国虚拟主机10强!40余项虚拟主机管理功能,全国领先!双线多线虚拟主机南北访问畅通无阻!免费赠送企业邮局,.CN域名,自助建站480元起,免费试用7天,满意再付款! P4主机租用799元/月.月付免压金!

Case 5: VelLevel = 300
Case 6: VelLevel = 250
Case 7: VelLevel = 200
Case 8: VelLevel = 150
Case 9: VelLevel = 100
Case 10: VelLevel = 50
Case 11: VelLevel = 10
End Select
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"

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名
注册