Programacion

Solo disponible en BuenasTareas
  • Páginas : 3 (544 palabras )
  • Descarga(s) : 7
  • Publicado : 2 de agosto de 2010
Leer documento completo
Vista previa del texto
Public Class Form1
Public xpos As Integer
Public ypos As Integer
Public j As Integer
Public i As Integer
Public matriz(10, 10)
Public pos As Integer
Public posiAs Integer
Public burritos As Collection
Public vidas As Integer = 3
Public nuevaX As Integer
Public nuevaY As Integer
Public miniBurrito As New PictureBox
PublicminiBurrox As Integer
Public miniBurroy As Integer
Public Sub crearBurritos()
Randomize()
miniBurrox = (7 * Rnd() + 1)
miniBurroy = (7 * Rnd() + 1)miniBurrito.Image = My.Resources.miniburro
miniBurrito.SizeMode = PictureBoxSizeMode.StretchImage
miniBurrito.Size = New Point(35, 35)
miniBurrito.Location = New Point((miniBurrox *53) + 1, (miniBurroy * 46) + 1)
MsgBox("X :" & (miniBurrox * 53) + 1 & "Y :" & (miniBurroy * 46) + 1)
Me.Controls.Add(miniBurrito)
miniBurrito.BackColor =Color.Transparent
miniBurrito.Visible = True
End Sub
Public Sub paredMatriz()
End Sub
Public Sub paredMatriz2()

End Sub
Private Sub Form1_Load(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles MyBase.Load
burritos = New Collection
burritos.Add(Me.PictureBox1)
crearBurritos()
Dim contador As IntegerWhile contador 0 Then
If matriz(i - 1, j) = "X" Then
vidas -= 1
contarVidas()
Exit Sub
Else
i -= 1ypos -= 46

Me.PictureBox1.Location = New Point(xpos, ypos)
End If
Else
If matriz(i, j) = "X" Then
vidas -= 1contarVidas()
Exit Sub
End If
End If
End Sub
Public Sub moverAbajo()
If i < 9 Then
If matriz(i + 1, j) = "X" Then...
tracking img