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)