Trouver une ressource (Nouvelle version du moteur, plus rapide & pertinent, essayez le !)
Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum.
Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !
TIKETAKETOE
Information sur la source
Description
héhé le fameux jeux, bien le voici mais jorais voulu ke mettre en «multiplayer» mais je navais pas les conaissanses D:. Alors si vous voulez participer pour le rendre, nésitez pas ;D. Mouais il nes pas tres optimiser,je le sais.
Source
- Dim couleur As Boolean
- Private Sub Form_Load()
- couleur = True
- End Sub
-
- Private Sub recommencer_Click()
- For i = tictac.LBound To tictac.UBound
- tictac(i).Enabled = True
- tictac(i).BackColor = RGB(192, 192, 192)
- couleur = True
- ki.Caption = "C'est aux rouges de jouer!"
- winner.Caption = ""
- Next i
- End Sub
-
- Private Sub tictac_Click(index As Integer)
- If couleur = True Then
- tictac(index).BackColor = RGB(255, 0, 0)
- couleur = False
- tictac(index).Enabled = False
- testr (index)
- ki.Caption = "C'est aux verts de jouer!"
- Else
- tictac(index).BackColor = RGB(0, 255, 0)
- couleur = True
- tictac(index).Enabled = False
- testv (index)
- ki.Caption = "C'est aux rouges de jouer!"
- End If
- End Sub
- Public Sub testr(index)
- If tictac(1).BackColor = tictac(2).BackColor And tictac(2).BackColor = tictac(3).BackColor And tictac(3).BackColor = RGB(255, 0, 0) Or _
- tictac(1).BackColor = tictac(4).BackColor And tictac(4).BackColor = tictac(7).BackColor And tictac(7).BackColor = RGB(255, 0, 0) Or _
- tictac(1).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(9).BackColor And tictac(9).BackColor = RGB(255, 0, 0) Or _
- tictac(2).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(8).BackColor And tictac(8).BackColor = RGB(255, 0, 0) Or _
- tictac(3).BackColor = tictac(6).BackColor And tictac(6).BackColor = tictac(9).BackColor And tictac(9).BackColor = RGB(255, 0, 0) Or _
- tictac(3).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(7).BackColor And tictac(7).BackColor = RGB(255, 0, 0) Or _
- tictac(4).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(6).BackColor And tictac(6).BackColor = RGB(255, 0, 0) Or _
- tictac(7).BackColor = tictac(8).BackColor And tictac(8).BackColor = tictac(9).BackColor And tictac(9).BackColor = RGB(255, 0, 0) Then
- If tictac(index).BackColor = RGB(255, 0, 0) Then
- winner.Caption = "Les rouges ont gangé!"
- ki.Caption = "Cliquez sur recommencer pour jouer une autre partie!"
- End If
- For i = tictac.LBound To tictac.UBound
- tictac(i).Enabled = False
- Next i
- ElseIf tictac(1).Enabled = False And tictac(2).Enabled = False And tictac(3).Enabled = False And tictac(4).Enabled = False And tictac(5).Enabled = False And tictac(6).Enabled = False And tictac(7).Enabled = False And tictac(8).Enabled = False And tictac(9).Enabled = False Then
- ki.Caption = "Cliquez sur recommencer pour jouer une autre partie!"
- winner.Caption = "Partie null!"
- End If
- End Sub
- Public Sub testv(index)
- If tictac(1).BackColor = tictac(2).BackColor And tictac(2).BackColor = tictac(3).BackColor And tictac(3).BackColor = RGB(0, 255, 0) Or _
- tictac(1).BackColor = tictac(4).BackColor And tictac(4).BackColor = tictac(7).BackColor And tictac(7).BackColor = RGB(0, 255, 0) Or _
- tictac(1).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(9).BackColor And tictac(9).BackColor = RGB(0, 255, 0) Or _
- tictac(2).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(8).BackColor And tictac(8).BackColor = RGB(0, 255, 0) Or _
- tictac(3).BackColor = tictac(6).BackColor And tictac(6).BackColor = tictac(9).BackColor And tictac(9).BackColor = RGB(0, 255, 0) Or _
- tictac(3).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(7).BackColor And tictac(7).BackColor = RGB(0, 255, 0) Or _
- tictac(4).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(6).BackColor And tictac(6).BackColor = RGB(0, 255, 0) Or _
- tictac(7).BackColor = tictac(8).BackColor And tictac(8).BackColor = tictac(9).BackColor And tictac(9).BackColor = RGB(0, 255, 0) Then
- If tictac(index).BackColor = RGB(0, 255, 0) Then
- winner.Caption = "Les verts ont gangé!"
- ki.Caption = "Cliquez sur recommencer pour jouer une autre partie!"
- End If
- For i = tictac.LBound To tictac.UBound
- tictac(i).Enabled = False
- Next i
- ElseIf tictac(1).Enabled = False And tictac(2).Enabled = False And tictac(3).Enabled = False And tictac(4).Enabled = False And tictac(5).Enabled = False And tictac(6).Enabled = False And tictac(7).Enabled = False And tictac(8).Enabled = False And tictac(9).Enabled = False Then
- ki.Caption = "Cliquez sur recommencer pour jouer une autre partie!"
- winner.Caption = "Partie null!"
- End If
- End Sub
Dim couleur As Boolean
Private Sub Form_Load()
couleur = True
End Sub
Private Sub recommencer_Click()
For i = tictac.LBound To tictac.UBound
tictac(i).Enabled = True
tictac(i).BackColor = RGB(192, 192, 192)
couleur = True
ki.Caption = "C'est aux rouges de jouer!"
winner.Caption = ""
Next i
End Sub
Private Sub tictac_Click(index As Integer)
If couleur = True Then
tictac(index).BackColor = RGB(255, 0, 0)
couleur = False
tictac(index).Enabled = False
testr (index)
ki.Caption = "C'est aux verts de jouer!"
Else
tictac(index).BackColor = RGB(0, 255, 0)
couleur = True
tictac(index).Enabled = False
testv (index)
ki.Caption = "C'est aux rouges de jouer!"
End If
End Sub
Public Sub testr(index)
If tictac(1).BackColor = tictac(2).BackColor And tictac(2).BackColor = tictac(3).BackColor And tictac(3).BackColor = RGB(255, 0, 0) Or _
tictac(1).BackColor = tictac(4).BackColor And tictac(4).BackColor = tictac(7).BackColor And tictac(7).BackColor = RGB(255, 0, 0) Or _
tictac(1).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(9).BackColor And tictac(9).BackColor = RGB(255, 0, 0) Or _
tictac(2).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(8).BackColor And tictac(8).BackColor = RGB(255, 0, 0) Or _
tictac(3).BackColor = tictac(6).BackColor And tictac(6).BackColor = tictac(9).BackColor And tictac(9).BackColor = RGB(255, 0, 0) Or _
tictac(3).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(7).BackColor And tictac(7).BackColor = RGB(255, 0, 0) Or _
tictac(4).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(6).BackColor And tictac(6).BackColor = RGB(255, 0, 0) Or _
tictac(7).BackColor = tictac(8).BackColor And tictac(8).BackColor = tictac(9).BackColor And tictac(9).BackColor = RGB(255, 0, 0) Then
If tictac(index).BackColor = RGB(255, 0, 0) Then
winner.Caption = "Les rouges ont gangé!"
ki.Caption = "Cliquez sur recommencer pour jouer une autre partie!"
End If
For i = tictac.LBound To tictac.UBound
tictac(i).Enabled = False
Next i
ElseIf tictac(1).Enabled = False And tictac(2).Enabled = False And tictac(3).Enabled = False And tictac(4).Enabled = False And tictac(5).Enabled = False And tictac(6).Enabled = False And tictac(7).Enabled = False And tictac(8).Enabled = False And tictac(9).Enabled = False Then
ki.Caption = "Cliquez sur recommencer pour jouer une autre partie!"
winner.Caption = "Partie null!"
End If
End Sub
Public Sub testv(index)
If tictac(1).BackColor = tictac(2).BackColor And tictac(2).BackColor = tictac(3).BackColor And tictac(3).BackColor = RGB(0, 255, 0) Or _
tictac(1).BackColor = tictac(4).BackColor And tictac(4).BackColor = tictac(7).BackColor And tictac(7).BackColor = RGB(0, 255, 0) Or _
tictac(1).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(9).BackColor And tictac(9).BackColor = RGB(0, 255, 0) Or _
tictac(2).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(8).BackColor And tictac(8).BackColor = RGB(0, 255, 0) Or _
tictac(3).BackColor = tictac(6).BackColor And tictac(6).BackColor = tictac(9).BackColor And tictac(9).BackColor = RGB(0, 255, 0) Or _
tictac(3).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(7).BackColor And tictac(7).BackColor = RGB(0, 255, 0) Or _
tictac(4).BackColor = tictac(5).BackColor And tictac(5).BackColor = tictac(6).BackColor And tictac(6).BackColor = RGB(0, 255, 0) Or _
tictac(7).BackColor = tictac(8).BackColor And tictac(8).BackColor = tictac(9).BackColor And tictac(9).BackColor = RGB(0, 255, 0) Then
If tictac(index).BackColor = RGB(0, 255, 0) Then
winner.Caption = "Les verts ont gangé!"
ki.Caption = "Cliquez sur recommencer pour jouer une autre partie!"
End If
For i = tictac.LBound To tictac.UBound
tictac(i).Enabled = False
Next i
ElseIf tictac(1).Enabled = False And tictac(2).Enabled = False And tictac(3).Enabled = False And tictac(4).Enabled = False And tictac(5).Enabled = False And tictac(6).Enabled = False And tictac(7).Enabled = False And tictac(8).Enabled = False And tictac(9).Enabled = False Then
ki.Caption = "Cliquez sur recommencer pour jouer une autre partie!"
winner.Caption = "Partie null!"
End If
End Sub
Sources de la même categorie
Commentaires
|
|