Register

Você não está conectado. Conecte-se ou registre-se

 #1Dom 9 Jun - 20:07

Davisnatsu


«Administrador»

«Administrador»

Davisnatsu

http://www.soldiercheats.com/forum

Jogo da Velha Empty Jogo da Velha
Apresento a vocês um jogo da velha!

Créditos:

Fuηмαη

&

Davis


Coloque no Form:

Código:
Sub Check()
If Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "X" Then
Button1.Enabled = True
Button2.Enabled = True
Button3.Enabled = True
MsgBox("Você ganhou!")
End
ElseIf Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "X" Then
Button4.Enabled = True
Button5.Enabled = True
Button6.Enabled = True
MsgBox("Você ganhou!")
End
ElseIf Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "X" Then
Button7.Enabled = True
Button8.Enabled = True
Button9.Enabled = True
MsgBox("Você ganhou!")
End
ElseIf Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "X" Then
Button1.Enabled = True
Button4.Enabled = True
Button7.Enabled = True
MsgBox("Você ganhou!")
End
ElseIf Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "X" Then
Button2.Enabled = True
Button5.Enabled = True
Button8.Enabled = True
MsgBox("Você ganhou!")
End
ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then
Button3.Enabled = True
Button6.Enabled = True
Button9.Enabled = True
MsgBox("Você ganhou!")
End
ElseIf Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "X" Then
Button1.Enabled = True
Button5.Enabled = True
Button9.Enabled = True
MsgBox("Você ganhou!")
End
ElseIf Button7.Text = "X" And Button5.Text = "X" And Button3.Text = "X" Then
Button7.Enabled = True
Button5.Enabled = True
Button3.Enabled = True
MsgBox("Você ganhou!")
End
End If
If Button1.Text = "O" And Button2.Text = "O" And Button3.Text = "O" Then
Button1.Enabled = True
Button2.Enabled = True
Button3.Enabled = True
MsgBox("Você perdeu!")
End
ElseIf Button4.Text = "O" And Button5.Text = "O" And Button6.Text = "O" Then
Button4.Enabled = True
Button5.Enabled = True
Button6.Enabled = True
MsgBox("Você perdeu!")
End
ElseIf Button7.Text = "O" And Button8.Text = "O" And Button9.Text = "O" Then
Button7.Enabled = True
Button8.Enabled = True
Button9.Enabled = True
MsgBox("Você perdeu!")
End
ElseIf Button1.Text = "O" And Button4.Text = "O" And Button7.Text = "O" Then
Button1.Enabled = True
Button4.Enabled = True
Button7.Enabled = True
MsgBox("Você perdeu!")
End
ElseIf Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O" Then
Button2.Enabled = True
Button5.Enabled = True
Button8.Enabled = True
MsgBox("Você perdeu!")
End
ElseIf Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O" Then
Button3.Enabled = True
Button6.Enabled = True
Button9.Enabled = True
MsgBox("Você perdeu!")
End
ElseIf Button1.Text = "O" And Button5.Text = "O" And Button9.Text = "O" Then
Button1.Enabled = True
Button5.Enabled = True
Button9.Enabled = True
MsgBox("Você perdeu!")
End
ElseIf Button7.Text = "O" And Button5.Text = "O" And Button3.Text = "O" Then
Button7.Enabled = True
Button5.Enabled = True
Button3.Enabled = True
MsgBox("Você perdeu!")
End
End If

Crie 9 Buttons e deixe em branco o texto:

Button1:

Código:
Button1.Enabled = False
Button1.Text = "X"
Check()
If Button5.Text = "" Then
Button5.Text = "O"
Button5.Enabled = False
ElseIf Button2.Text = "" Then
Button2.Text = "O"
Button2.Enabled = False
ElseIf Button4.Text = "" Then
Button4.Text = "O"
Button4.Enabled = False
ElseIf Button3.Text = "" Then
Button3.Text = "O"
Button3.Enabled = False
ElseIf Button6.Text = "" Then
Button6.Text = "O"
Button6.Enabled = False
ElseIf Button7.Text = "" Then
Button7.Text = "O"
Button7.Enabled = False
ElseIf Button9.Text = "" Then
Button9.Text = "O"
Button9.Enabled = False
ElseIf Button8.Text = "" Then
Button8.Text = "O"
Button8.Enabled = False
Else
MsgBox("Jogo impatado!")
End If
Check()

Code Button2:

Código:
Button2.Enabled = False
Button2.Text = "X"
Check()
If Button5.Text = "" Then
Button5.Text = "O"
Button5.Enabled = False
ElseIf Button1.Text = "" Then
Button1.Text = "O"
Button1.Enabled = False
ElseIf Button4.Text = "" Then
Button4.Text = "O"
Button4.Enabled = False
ElseIf Button3.Text = "" Then
Button3.Text = "O"
Button3.Enabled = False
ElseIf Button6.Text = "" Then
Button6.Text = "O"
Button6.Enabled = False
ElseIf Button7.Text = "" Then
Button7.Text = "O"
Button7.Enabled = False
ElseIf Button9.Text = "" Then
Button9.Text = "O"
Button9.Enabled = False
ElseIf Button8.Text = "" Then
Button8.Text = "O"
Button8.Enabled = False
Else
MsgBox("Jogo impatado!")
End If
Check()

Code Button3:

Código:
Button3.Enabled = False
Button3.Text = "X"
Check()
If Button5.Text = "" Then
Button5.Text = "O"
Button5.Enabled = False
ElseIf Button2.Text = "" Then
Button2.Text = "O"
Button2.Enabled = False
ElseIf Button4.Text = "" Then
Button4.Text = "O"
Button4.Enabled = False
ElseIf Button3.Text = "" Then
Button3.Text = "O"
Button3.Enabled = False
ElseIf Button6.Text = "" Then
Button6.Text = "O"
Button6.Enabled = False
ElseIf Button7.Text = "" Then
Button7.Text = "O"
Button7.Enabled = False
ElseIf Button9.Text = "" Then
Button9.Text = "O"
Button9.Enabled = False
ElseIf Button8.Text = "" Then
Button8.Text = "O"
Button8.Enabled = False
Else
MsgBox("Jogo impatado!")
End If
Check()

Code Button4:


Código:
Button4.Enabled = False
Button4.Text = "X"
Check()
If Button5.Text = "" Then
Button5.Text = "O"
Button5.Enabled = False
ElseIf Button3.Text = "" Then
Button3.Text = "O"
Button3.Enabled = False
ElseIf Button4.Text = "" Then
Button4.Text = "O"
Button4.Enabled = False
ElseIf Button3.Text = "" Then
Button3.Text = "O"
Button3.Enabled = False
ElseIf Button6.Text = "" Then
Button6.Text = "O"
Button6.Enabled = False
ElseIf Button7.Text = "" Then
Button7.Text = "O"
Button7.Enabled = False
ElseIf Button9.Text = "" Then
Button9.Text = "O"
Button9.Enabled = False
ElseIf Button8.Text = "" Then
Button8.Text = "O"
Button8.Enabled = False
Else
MsgBox("Jogo impatado!")
End If
Check()

Code Button5:

Código:
Button5.Enabled = False
Button5.Text = "X"
Check()
If Button1.Text = "" Then
Button1.Text = "O"
Button1.Enabled = False
ElseIf Button2.Text = "" Then
Button2.Text = "O"
Button2.Enabled = False
ElseIf Button4.Text = "" Then
Button4.Text = "O"
Button4.Enabled = False
ElseIf Button3.Text = "" Then
Button3.Text = "O"
Button3.Enabled = False
ElseIf Button6.Text = "" Then
Button6.Text = "O"
Button6.Enabled = False
ElseIf Button7.Text = "" Then
Button7.Text = "O"
Button7.Enabled = False
ElseIf Button9.Text = "" Then
Button9.Text = "O"
Button9.Enabled = False
ElseIf Button8.Text = "" Then
Button8.Text = "O"
Button8.Enabled = False
Else
MsgBox("Jogo impatado!")
End If
Check()

Code Button6:

Código:
Button6.Enabled = False
Button6.Text = "X"
Check()
If Button5.Text = "" Then
Button5.Text = "O"
Button5.Enabled = False
ElseIf Button2.Text = "" Then
Button2.Text = "O"
Button2.Enabled = False
ElseIf Button4.Text = "" Then
Button4.Text = "O"
Button4.Enabled = False
ElseIf Button3.Text = "" Then
Button3.Text = "O"
Button3.Enabled = False
ElseIf Button1.Text = "" Then
Button1.Text = "O"
Button1.Enabled = False
ElseIf Button7.Text = "" Then
Button7.Text = "O"
Button7.Enabled = False
ElseIf Button9.Text = "" Then
Button9.Text = "O"
Button9.Enabled = False
ElseIf Button8.Text = "" Then
Button8.Text = "O"
Button8.Enabled = False
Else
MsgBox("Jogo impatado!")
End If
Check()

Code Button7:

Código:
Button7.Enabled = False
Button7.Text = "X"
Check()
If Button5.Text = "" Then
Button5.Text = "O"
Button5.Enabled = False
ElseIf Button2.Text = "" Then
Button2.Text = "O"
Button2.Enabled = False
ElseIf Button4.Text = "" Then
Button4.Text = "O"
Button4.Enabled = False
ElseIf Button3.Text = "" Then
Button3.Text = "O"
Button3.Enabled = False
ElseIf Button6.Text = "" Then
Button6.Text = "O"
Button6.Enabled = False
ElseIf Button1.Text = "" Then
Button1.Text = "O"
Button1.Enabled = False
ElseIf Button9.Text = "" Then
Button9.Text = "O"
Button9.Enabled = False
ElseIf Button8.Text = "" Then
Button8.Text = "O"
Button8.Enabled = False
Else
MsgBox("Jogo impatado!")
End If
Check()

Code Button8:

Código:
Button8.Enabled = False
Button8.Text = "X"
Check()
If Button5.Text = "" Then
Button5.Text = "O"
Button5.Enabled = False
ElseIf Button2.Text = "" Then
Button2.Text = "O"
Button2.Enabled = False
ElseIf Button4.Text = "" Then
Button4.Text = "O"
Button4.Enabled = False
ElseIf Button3.Text = "" Then
Button3.Text = "O"
Button3.Enabled = False
ElseIf Button6.Text = "" Then
Button6.Text = "O"
Button6.Enabled = False
ElseIf Button7.Text = "" Then
Button7.Text = "O"
Button7.Enabled = False
ElseIf Button9.Text = "" Then
Button9.Text = "O"
Button9.Enabled = False
ElseIf Button1.Text = "" Then
Button1.Text = "O"
Button1.Enabled = False
Else
MsgBox("Jogo impatado!")
End If
Check()

Code Button9:

Código:
Button9.Enabled = False
Button9.Text = "X"
Check()
If Button5.Text = "" Then
Button5.Text = "O"
Button5.Enabled = False
ElseIf Button2.Text = "" Then
Button2.Text = "O"
Button2.Enabled = False
ElseIf Button4.Text = "" Then
Button4.Text = "O"
Button4.Enabled = False
ElseIf Button3.Text = "" Then
Button3.Text = "O"
Button3.Enabled = False
ElseIf Button6.Text = "" Then
Button6.Text = "O"
Button6.Enabled = False
ElseIf Button7.Text = "" Then
Button7.Text = "O"
Button7.Enabled = False
ElseIf Button1.Text = "" Then
Button1.Text = "O"
Button1.Enabled = False
ElseIf Button8.Text = "" Then
Button8.Text = "O"
Button8.Enabled = False
Else
MsgBox("Jogo impatado!")
End If
Check()

 #2Qua 12 Jun - 19:24

-Stronda.


Member Ajudante

Member Ajudante

-Stronda.


Jogo da Velha Empty Re: Jogo da Velha
Coloque umas
Prints , Para o melhor entendimento do Tutorial
Pois iniciantes não conseguiriam fazer!

 #3Qua 12 Jun - 20:47

Davisnatsu


«Administrador»

«Administrador»

Davisnatsu

http://www.soldiercheats.com/forum

Jogo da Velha Empty Re: Jogo da Velha
O Tutorial e simples de fazer

Abraços~

 #4

Conteúdo patrocinado






Jogo da Velha Empty Re: Jogo da Velha


Anúncios



Ver o tópico anterior Ver o tópico seguinte Ir para o topo Mensagem [Página 1 de 1]

Permissões neste sub-fórum
Não podes responder a tópicos

 

Banner