Cluedo (simplifié)
Auteur
Message
freeze
Autorisation : Membre
Nb de messages : 2
Inscrit le : Mer 13 Oct 2010, 15:10
Posté le : Mer 13 Oct 2010, 15:32
Ce jeu est mon tout premier programme que je termine et qui marche !
C'est un Cluedo un peu simplifié car je n'ai pas du tout réussi à programmer un "vrai" Cluedo où on peut se déplacer dans le manoir et où on est obligé d'être dans une pièce pour y faire une hypothèse...
Code :Lbl M
:0->V
:Menu("CLUEDO","JOUER",1,"QUITTER",3)
:Lbl 1
:ClrHome
:Input "JOUEUR 1:",Str1
:Input "JOUEUR 2:",Str2
:Input "JOUEUR 3:",Str3
:ClrHome
:Lbl G
:randInt(1,5)->A
:If A=1:"REVOLVER"->Str4
:If A=2:"POIGNARD"->Str4
:If A=3:"POISON"->Str4
:If A=4:"CORDE"->Str4
:If A=5:"CHANDELIER"->Str4
:randInt(1,3)->B
:If B=1:Str1->Str5
:If B=2:Str2->Str5
:If B=3:Str3->Str5
:randInt(1,7)->C
:If C=1:"BUREAU"->Str6
:If C=2:"HALL"->Str6
:If C=3:"SALON"->Str6
:If C=4:"CUISINE"->Str6
:If C=5:"SALLE A MANGER"->Str6
:If C=6:"BIBLIOTHEQUE"->Str6
:If C=7:"JARDIN"->Str6
:Lbl X
:ClrHome
:1->D:0->E:0->F
:Menu(Str1,"HYPOTHESE",S,"ACCUSER",N)
:Lbl Y
:ClrHome
:0->D:1->E:0->F
:Menu(Str2,"HYPOTHESE",S,"ACCUSER",N)
:Lbl Z
:ClrHome
:0->D:0->E:1->F
:Menu(Str3,"HYPOTHESE",S,"ACCUSER",N)
:Lbl S
:0->W
:Lbl U
:ClrHome
:Disp "EX: ",Str1+",",Str2+",",Str3,"---------------"
:Input "QUI? ",Str7
:ClrHome
:Disp "EX: BUREAU,HALL,","SALON,CUISINE,","BIBLIOTHEQUE,","SALLE A MANGER,","JARDIN","---------------"
:Input "OU? ",Str8
:ClrHome
:Disp "EX: REVOLVER,","POISON,POIGNARD,","CORDE,CHANDELIER","---------------"
:Input "COMMENT? ",Str9
:If W=1:Goto K
:ClrHome
:Output(2,1,Str7)
:Output(4,1,Str8)
:Output(6,1,Str9)
:If Str4=Str9
:Then:Output(6,12,"VRAI")
:Else:Output(6,12,"FAUX")
:End
:If Str5=Str7
:Then:Output(2,12,"VRAI")
:Else:Output(2,12,"FAUX")
:End
:If Str6=Str8
:Then:Output(4,12,"VRAI")
:Else:Output(4,12,"FAUX")
:End
:Pause
:If D=1:Goto Y
:If E=1:Goto Z
:If F=1:Goto X
:Lbl N
:1->W
:Goto U
:Lbl K
:ClrHome
:Output(1,4,"REPONSES:"
:Output(3,3,Str4)
:Output(5,3,Str5)
:Output(7,3,Str6)
:If Str4=Str9
:Then:V+1->V
:Else:0->V
:End
:If Str5=Str7
:Then:V+1->V
:Else:0->V
:End
:If Str6=Str8
:Then:V+1->V
:Else:0->V
:End
:Pause
:ClrHome
:If V=3
:Then:Output(4,2,"VOUS GAGNEZ!!!"
:Else:Output(4,2,"VOUS PERDEZ..."
:End
:Pause
:Goto M
:Lbl 3
:ClrHome
:Stop
Persalteas
Autorisation : Membre
Nb de messages : 2086
Inscrit le : Sam 23 Jan 2010, 20:09
Posté le : Mer 13 Oct 2010, 15:36
wha!!
alors la chapeau!
j'ai pas le temps de recopier, mais bravo c'est original je trouve.
remarque le prog est en menus mais même c'est cool comme idée.
freeze
Autorisation : Membre
Nb de messages : 2
Inscrit le : Mer 13 Oct 2010, 15:10
Posté le : Sam 16 Oct 2010, 11:29
Désolé pour l'erreur que je viens de rectifié : à la ligne sous le Lbl N, ce n'est pas 0->W mais 1->W...
Je m'excuse pour ceux qui l'avez recopié
|- TI-82 | |- Archives |- TI-82 STATS | |- Archives |- TI-82 STATS.fr | |- Archives |- TI-82+ | |- Archives |- TI-82 Advanced | |- Archives |- TI-82 Advanced Edition Python | |- Archives |- Câble, logiciel de transmission et émulateur | |- Archives |- Les programmes des internautes |- Les programmes du site |- Aide à la programmation | |- Archives |- Python82 |- Les concours |- Articles |- Le "blog" |- Que pensez-vous du site ? |- Espace de liberté
Page générée en 9 requêtes