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
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!



