Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
3086 connectés 

 


Dernière réponse
Sujet : jeu en vb 5
math MERCI

Votre réponse
Nom d'utilisateur    Pour poster, vous devez être inscrit sur ce forum .... si ce n'est pas le cas, cliquez ici !
Le ton de votre message                        
                       
Votre réponse


[b][i][u][strike][spoiler][fixed][cpp][url][email][img][*]   
 
   [quote]
 

Options

 
Vous avez perdu votre mot de passe ?


Vue Rapide de la discussion
math MERCI
Dost67 Excuse moi j'ai inversé : l'adresse c'est http://www.c2i.fr/ .
math MERCI BCP
Kalou Voila des images des 2 feuilles...
 
http://perso.club-internet.fr/raoust/bantumi1.jpg  
 
http://perso.club-internet.fr/raoust/bantumi2.jpg  
 
et l'adresse de l'exe...
http://perso.club-internet.fr/raoust/Bantumi.exe
 
Voila...
math Kalou ---> JE VEUX BIEN KE TU M ENVOIES L EXE ET LES IMAGES OCI CI POSSIBLE.
MERCI BCP CA VA ME SAUVER LA VIE
math Dost67 -->BEUUUH C EST CON CA MARCHE PAS  :??:
math MERCI BCP
JE JETTE UN OUEIL AU CODE ET SI J AI BESION DE VOUS DEMANDERAI L EXE
Kalou C'est un jeu que j'avais fait ya un moment... c'est dans le style de l'awalé (ou le Bantumi sur les Nokia 3310...) enfin voila je pourrai t'envoyer l'*.exe pour que tu voies les objets la ya que le code mais en entier... enfin voila ...
 
 
Option Explicit
Dim NBoule As Variant
Dim NBTas As Variant
Dim IncTas As Variant
Dim VertJoue As Boolean
Dim JauneJoue As Boolean
Dim Victoire As Integer
Dim a As Integer
Dim timing1 As Integer
Dim timing2 As Integer
 
Private Sub Command1_Click()
Intro.Show
Game.Hide
VertJoue = True
JauneJoue = False
If Victoire <> 0 Then
    Label1.Caption = "Joueur Vert : "
    Label2.Caption = "Joueur Jaune : "
End If
Shape3.Visible = False
Shape4.Visible = False
Timer1.Interval = 0
Victoire = 0
End Sub
 
Private Sub Form_Load()
Label1.Caption = Label1.Caption & Intro.Text1.Text
Label2.Caption = Label2.Caption & Intro.Text2.Text
Label5.Caption = "C'est au tour de " & Intro.Text1.Text & " de jouer."
VertJoue = True
JauneJoue = False
Victoire = 0
For a = 0 To 16
    Tas(a).Caption = 5
Next a
Tas(8).Caption = 0
Tas(17).Caption = 0
For a = 9 To 16
    Tas(a).Enabled = False
Next a
For a = 0 To 7
    Tas(a).Enabled = True
Next a
Shape3.Visible = False
Shape4.Visible = False
Timer1.Interval = 0
End Sub
 
Private Sub Form_Terminate()
End
End Sub
 
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
 
Private Sub Tas_Click(Index As Integer)
 
 
If Victoire <> 0 Then Exit Sub
If Index = 8 Or Index = 17 Then Exit Sub
If Tas(Index).Caption = 0 Then Exit Sub
 
'Définition des variables
NBoule = Tas(Index).Caption
NBTas = Tas(Index).Caption
Tas(Index).Caption = "0"
 
'Définition du joueur
If Index < 8 Then VertJoue = True
If Index > 8 Then JauneJoue = True
 
'Boucle de dépos de boules
For NBoule = NBTas To 1 Step -1
 
'Retour au début
    Index = Index + 1
    If VertJoue = True Then
        If Index = 17 Then Index = 0
    End If
    If JauneJoue = True Then
        If Index = 8 Then Index = 9
        If Index = 18 Then Index = 0
    End If
 
'Dépos de boules
    IncTas = Tas(Index).Caption
    Tas(Index).Caption = IncTas + 1
     
'temporisation
If Intro.Option1.Value = True Then
    For timing1 = 0 To 4000
        For timing2 = 0 To 6000
        Next timing2
    Next timing1
    Game.Refresh
End If
 
Next NBoule
 
 
If VertJoue = True Then
    If Index = 0 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(8).Caption = Int(Tas(8).Caption) + Int(Tas(16).Caption) + 1
            Tas(16).Caption = 0
        End If
    End If
    If Index = 1 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(8).Caption = Int(Tas(8).Caption) + Int(Tas(15).Caption) + 1
            Tas(15).Caption = 0
        End If
    End If
    If Index = 2 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(8).Caption = Int(Tas(8).Caption) + Int(Tas(14).Caption) + 1
            Tas(14).Caption = 0
        End If
    End If
    If Index = 3 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(8).Caption = Int(Tas(8).Caption) + Int(Tas(13).Caption) + 1
            Tas(13).Caption = 0
        End If
    End If
    If Index = 4 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(8).Caption = Int(Tas(8).Caption) + Int(Tas(12).Caption) + 1
            Tas(12).Caption = 0
        End If
    End If
    If Index = 5 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(8).Caption = Int(Tas(8).Caption) + Int(Tas(11).Caption) + 1
            Tas(11).Caption = 0
        End If
    End If
    If Index = 6 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(8).Caption = Int(Tas(8).Caption) + Int(Tas(10).Caption) + 1
            Tas(10).Caption = 0
        End If
    End If
    If Index = 7 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(8).Caption = Int(Tas(8).Caption) + Int(Tas(9).Caption) + 1
            Tas(9).Caption = 0
        End If
    End If
End If
         
If JauneJoue = True Then
    If Index = 9 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(17).Caption = Int(Tas(17).Caption) + Int(Tas(7).Caption) + 1
            Tas(7).Caption = 0
        End If
    End If
    If Index = 10 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(17).Caption = Int(Tas(17).Caption) + Int(Tas(6).Caption) + 1
            Tas(6).Caption = 0
        End If
    End If
    If Index = 11 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(17).Caption = Int(Tas(17).Caption) + Int(Tas(5).Caption) + 1
            Tas(5).Caption = 0
        End If
    End If
    If Index = 12 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(17).Caption = Int(Tas(17).Caption) + Int(Tas(4).Caption) + 1
            Tas(4).Caption = 0
        End If
    End If
    If Index = 13 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(17).Caption = Int(Tas(17).Caption) + Int(Tas(3).Caption) + 1
            Tas(3).Caption = 0
        End If
    End If
    If Index = 14 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(17).Caption = Int(Tas(17).Caption) + Int(Tas(2).Caption) + 1
            Tas(2).Caption = 0
        End If
    End If
    If Index = 15 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(17).Caption = Int(Tas(17).Caption) + Int(Tas(1).Caption) + 1
            Tas(1).Caption = 0
        End If
    End If
    If Index = 16 Then
        If Tas(Index).Caption = 1 Then
            Tas(Index).Caption = 0
            Tas(17).Caption = Int(Tas(17).Caption) + Int(Tas(0).Caption) + 1
            Tas(0).Caption = 0
        End If
    End If
End If
 
If Tas(0).Caption = 0 And Tas(1).Caption = 0 And Tas(2).Caption = 0 And Tas(3).Caption = 0 And Tas(4).Caption = 0 And Tas(5).Caption = 0 And Tas(6).Caption = 0 And Tas(7).Caption = 0 Then
    For a = 0 To 16
        Tas(a).Enabled = False
    Next a
    Tas(8).Enabled = True
    Tas(17).Caption = Int(Tas(17).Caption) + Int(Tas(9).Caption) + Int(Tas(10).Caption) + Int(Tas(11).Caption) + Int(Tas(12).Caption) + Int(Tas(13).Caption) + Int(Tas(14).Caption) + Int(Tas(15).Caption) + Int(Tas(16).Caption)
    For a = 9 To 16
        Tas(a).Caption = 0
    Next a
    If Tas(8).Caption > Tas(17).Caption Then
        Label5.Caption = "Le vainqueur est " & Intro.Text1.Text & " !"
        Victoire = 1
        Shape4.Visible = True
    Else
        Label5.Caption = "Le vainqueur est " & Intro.Text2.Text & " !"
        Victoire = 2
        Shape3.Visible = True
    End If
    Timer1.Interval = 300
End If
 
If Tas(9).Caption = 0 And Tas(10).Caption = 0 And Tas(11).Caption = 0 And Tas(12).Caption = 0 And Tas(13).Caption = 0 And Tas(14).Caption = 0 And Tas(15).Caption = 0 And Tas(16).Caption = 0 Then
    For a = 0 To 16
        Tas(a).Enabled = False
    Next a
    Tas(8).Enabled = True
    Tas(8).Caption = Int(Tas(8).Caption) + Int(Tas(0).Caption) + Int(Tas(1).Caption) + Int(Tas(2).Caption) + Int(Tas(3).Caption) + Int(Tas(4).Caption) + Int(Tas(5).Caption) + Int(Tas(6).Caption) + Int(Tas(7).Caption)
    For a = 0 To 7
        Tas(a).Caption = 0
    Next a
    If Tas(8).Caption > Tas(17).Caption Then
        Label5.Caption = "Le vainqueur est " & Intro.Text1.Text & " !"
        Victoire = 1
        Shape4.Visible = True
    Else
        Label5.Caption = "Le vainqueur est " & Intro.Text2.Text & " !"
        Victoire = 2
        Shape3.Visible = True
    End If
    Timer1.Interval = 300
End If
 
If Victoire = 0 Then
    If VertJoue = True Then
        If Index = 8 Then
            Exit Sub
        End If
        If Index <> 8 Then
            VertJoue = False
            JauneJoue = True
            Label5.Caption = "C'est au tour de " & Intro.Text2.Text & " de jouer."
            For a = 9 To 16
                Tas(a).Enabled = True
            Next a
            For a = 0 To 7
                Tas(a).Enabled = False
            Next a
            Exit Sub
        End If
    End If
     
    If JauneJoue = True Then
        If Index = 17 Then
            Exit Sub
        End If
        If Index <> 17 Then
            VertJoue = True
            JauneJoue = False
            Label5.Caption = "C'est au tour de " & Intro.Text1.Text & " de jouer."
            For a = 9 To 16
                Tas(a).Enabled = False
            Next a
            For a = 0 To 7
                Tas(a).Enabled = True
            Next a
            Exit Sub
        End If
    End If
End If
Label6.Caption = Victoire
End Sub
 
Private Sub Timer1_Timer()
If Victoire = 1 Then
    If Shape4.FillColor = RGB(0, 0, 0) Then
        Shape4.FillColor = RGB(255, 255, 0)
        Exit Sub
    End If
    If Shape4.FillColor = RGB(255, 255, 0) Then
        Shape4.FillColor = RGB(0, 0, 0)
        Exit Sub
    End If
End If
If Victoire = 2 Then
    If Shape3.FillColor = RGB(0, 0, 0) Then
        Shape3.FillColor = RGB(0, 255, 0)
        Exit Sub
    End If
    If Shape3.FillColor = RGB(0, 255, 0) Then
        Shape3.FillColor = RGB(0, 0, 0)
        Exit Sub
    End If
End If
End Sub
Dost67 Cherche un site qui s'appelle CI2.FR (voir sur Yahoo.fr). Il doit y avoir ce que tu cherches.
math je cherche un code de jeu en vb 5(sans active x), ca me sauverait la vie, merci d'avance

Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)