Précédent
- 1
- 2
- 3
-
-
si si... c'est ca :) bon, y aplus court bien sur, mais c'est l idée :)
allez.. comme t as trouver, j te donne la solution :)
PasFini =false
For Each bt In Command1 'pour tous les controls de command1
If bt.Caption = "" Then PasFini = True 'met la veriable pasfini à vrai si il trouve un command vide
Next
If Not PasFini Then 'si ce n'est pas pas fini=> fini
If MsgBox("Match nul." & Chr$(10) & Chr$(13) & "Nouvelle partie ?", vbYesNo) = vbYes Then NouveauJeu_Click
End If -
If Command1(1).Caption <> "" And Command1(5).Caption <> "" And Command1(9).Caption <> "" Then Exit Sub
If Command1(3).Caption <> "" And Command1(5).Caption <> "" And Command1(7).Caption <> "" Then Exit Sub
If Command1(1).Caption <> "" And Command1(2).Caption <> "" And Command1(3).Caption <> "" And Command1(4).Caption <> "" And Command1(5).Caption <> "" And Command1(6).Caption <> "" And Command1(7).Caption <> "" And Command1(8).Caption <> "" And Command1(9).Caption <> "" Then
MsgBox "Match Nul"
J'ai trouvé tout seul !!!
J'ai pa encore lu ta solution ;) -
Parceque en fait si on faisait
If Command1(1).Caption <> "" And Command1(2).Caption <> "" And Command1(3).Caption <> "" And Command1(4).Caption <> "" And Command1(5).Caption <> "" And Command1(6).Caption <> "" And Command1(7).Caption <> "" And Command1(8).Caption <> "" And Command1(9).Caption <> "" Then
MsgBox "Match Nul"
et que toutes les cases était coché mais que soit o soit x gagnait en diagonale sa mettai
fenetre x ou o gagne
et apres fenetre match nul
mais la c bon :p -
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question -
non, car il faut mettre un exit sub si un joueur gagne ;)
-
Comment sa ?
lol je te laisse faire voir ce que tu essai de me dire la si un joeur gagne c'est bon sa met la box x ou o gagne lol -
ben si un joueur gagne .. y a plus rien a faire (mis a part recommencer une partie) donc.. le code qu'il y a apres on le squizz.. d'où le exit sub si gagné tu me suis??
-
Ouais on peut faire un reset sinnon ?
enfin sinnon tu le placerait ou le exit sub escuse chui un peu fatigué :) -
apres le "gagné" mais avant l exit sub bien sur...
Précédent
- 1
- 2
- 3