Memorama En Visual Basic

Páginas: 2 (267 palabras) Publicado: 20 de noviembre de 2012
Dim segundo As Integer
Dim comp, comt As Integer
Dim cont, puntos, movimiento, parimpar As Integer
Sub RevisarTodo()
Dim Seguirjugando, JuegoTerminado As Boolean
Dim contadorAs Integer
Seguirjugando = False
JuegoTerminado = False
contador = 0
Do While (Not Seguirjugando) Or (JuegoTerminado) = True
If game.Imagen(contador).Visible = False ThenSeguirjugando = True
End If
If contador = 15 Then
JuegoTerminado = True
Timer1.Enabled = False
Exit Do
End If
contador = contador + 1
Loop
If JuegoTerminado Then
MsgBox("FELICIDADES")
End If
End Sub
Private Sub A_Click(Index As Integer)
game.Imagen(Index).Visible = True
game.A(Index).Visible = False
cont = cont + 1
movimienti = movimiento + 1
Ifcont = 1 Then
comp = Index
End If
If cont = 2 Then
cont = 0
comt = Index
parimpar = indexMod2
If parimpar = 0 Then
If game.Imagen(Index + 1).Visible = False Then
MsgBox("Malo Malo")
game.Imagen(comp).Visible = False
game.Imagen(comt).Visible = False
game.A(comp).Visible = True
game.A(comt).Visible = True
puntos = puntos - 50
Label.Caption =puntos
Else
Revisar Todo
puntos = puntos + 100
Label2.Caption = puntos
End If
Else
If game.Imagen(Index - 1).Visible = False Then
MsgBox ("Malisimo")
game.Imagen (comp):Visible = False
game.Imagen(comt).Visible = False
game.A(comp).Visible = True
game.A(comt).Visible = True
puntos = puntos - 50
Label.Caption = puntos
Else
puntos = puntos + 100Label2.Caption = puntos
End If
End If
End If
Label.Caption = movimiento
End Sub

Private Sub Command1_Click()
End
End Sub

Private Sub Form_Load()
cont = 0
Dim q AsInteger
For q = 0 To 15
Imagen(q).Visible = False
A(q).Visible = True
Next
End Sub

Private Sub Timer1_Timer()
segundo = segundo + 1
Label5.Caption=segundo& "seg"
End Sub
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Visual basic
  • Que Es El Visual Basic
  • visual basic
  • Visual Basic
  • Que es visual basic
  • Visual basic
  • Que es visual basic
  • Visual Basic

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS