Poster un nouveau sujet Poster une réponse
JEUX divers
Auteur Message
m@thieu41



Autorisation : Membre
Nb de messages : 848
Inscrit le : Mer 18 Juil 2012, 18:44
Posté le : Dim 09 Sep 2012, 18:34   Citer 

Bonsoir à tous! bigmouth.gif

J'ai enfin eut accès à un câble, et j'ai donc pu transférer mon programme de jeux sur l'ordinateur. cupsmiley.gif

Il contient:
.Des jeux 1 joueur:
_Réflexe(réalisé à partir de l'énoncé du site du zéro)
_Alumettes
_Snake
.Des jeux 2 joueurs(sur une seule calto pour l'instant):
_Ping-pong(il ne marche pas super, il faut que je modifie 2-3 trucs crazy.gif )
_Morpion
_Pendu

Il y a encore des optimisations à faire, je m'y mets dès que possible.
Voici le code source:

Code
Send(9prgmZBAR
StoreGDB 0
AxesOff
GridOff
PlotsOff
FnOff
ClrDraw
0->Ymax
0->Xmin
( - )62->Ymin
94->Xmax
Lbl 0
ClrHome
Menu("JEUX","1 JOUEUR",1J,"2 JOUEURS",2J,"CREDITS",1,"SORTIR",2
Lbl 1J
Menu("1 JOUEUR","REFLEXE",A,"SNAKE",B,"ALUMETTES",E,"RETOUR",0,"SORTIR",2
Lbl 2J
ClrHome
Menu("2 JOUEURS","PING-PONG",C,"MORPION",D,"PENDU",F,"RETOUR",0,"SORTIR",2
Lbl E
ClrHome
Menu("ALUMETTES","LE JEU",EJ,"LES REGLES",ER,"RETOUR",0,"SORTIR",2
Lbl ER
ClrHome
Output(1,4,"LES REGLES
Output(3,4,"VOUS DEVEZ    ENLEVER ENTRE 1 ET 3 ALUMETTES, DE MANIERE A CEQU IL N EN RESTE    QUE UNE
Pause
ClrHome
Output(3,2,"VOUS PERDEZ SI    VOUS DEVEZ      RETIRER LA       DERNIERE        ALUMETTE
Pause
Output(2,3,"UTILISEZ LES     FLECHES OU     INDIQUEZ LE        NOMBRE      D ALUMETTES A  ENLEVER, VALIDEZ   AVEC ENTRER
Pause
ClrHome
Output(4,5,"BON JEU!
Pause
ClrHome
Goto E
Lbl EJ
DelVar FClrHome
Menu("CHOIX DU NIVEAU","FACILE",E1,"NORMAL",E2,"EXPERT",E3,"RETOUR",E,"SORTIR",2
Lbl E1
50->F
Lbl E2
F+25->F
Lbl E3
F+1->F
Lbl E4
ClrDraw
Text(20,30,"ALUMETTES
Line(28,( - )19,66,( - )19
Line(28,( - )19,28,( - )27
Line(28,( - )27,66,( - )27
Line(66,( - )27,66,( - )19
Text(35,23,"PAR: MATHIEU 41
Pause
DelVar SClrDraw
Repeat O>0
ClrHome
Disp "NOMBRE DE PARTIE
Input "=",O
End
ClrHome
For(E,1,O
ClrDraw
Text(57,26,"VOTRE SCORE: ",S
15->A
Ans->T
For(I,1,Ans
6I-3
Pxl-On(A,Ans
Line(Ans,( - )A-1,Ans-2,( - )A-3
Line(Ans,( - )A-1,Ans+2,( - )A-3
Line(Ans-2,( - )A-4,Ans-2,( - )A-30
Line(Ans+2,( - )A-4,Ans+2,( - )A-30
Line(Ans-1,( - )A-31,Ans+1,( - )A-31
End
106->dim(L6
1->L6(93
2->L6(94
3->L6(95
10->L6(25
10->L6(27
getKey
If Ans=45
Goto 2
DelVar Kint(2rand->X
While T>1
1->N
"C EST A
If X
Then
Ans+"VOUS DE JOUER!       
Else
Ans+"L ORDI DE JOUER!
End
Text(4,12,Ans
6T-3->B
Pxl-On(48,Ans
Line(Ans-1,( - )49,Ans+1,( - )49
Line(Ans-1,( - )50,Ans+1,( - )50
Text(51,Ans-1,N
If X
Then
getKey
Repeat K=106
getKey+1->K
If Ans=46
Goto 2
If L6(Ans
Then
N+(Ans=25 and N<3)-(Ans=27 and N>1->N
If 8>L6(K
L6(K->N
While T-N<1
N-1->N
End
If not(pxl-Test(48,3+6(T-N
Then
Pxl-Off(48,B
Line(B-1,( - )49,B+1,( - )49,0
Line(B-1,( - )50,B+1,( - )50,0
Text(51,B-1,"     
3+6(T-N
Pxl-On(48,Ans
Line(Ans-1,( - )49,Ans+1,( - )49
Line(Ans-1,( - )50,Ans+1,( - )50
Text(51,Ans-1,N
End
End
End
Else
If F>int(û2rand
Then
Repeat T-N>=1
1+iPart(3rand->N
End
Else
4fPart(.25(T-1->N
If not(Ans
Then
Repeat T-N>=1
1+iPart(3rand->N
End
End
End
Repeat fPart(.5N)=fPart(.5M
1+iPart(4rand->M
End
If T=2
Ans->M
If M=1 and N=3
3->M
1->H
While M
3+6(T-H->B
Pxl-On(48,Ans
Line(Ans-1,( - )49,Ans+1,( - )49
Line(Ans-1,( - )50,Ans+1,( - )50
Text(51,Ans-1,H
If H=1 or H=3
Then
2->H
Else
If M=2
Then
N->H
Else
Repeat H!=2
1+iPart(3rand->H
End
End
End
For(W,0,64+iPart(32rand
End
M-1->M
Pxl-Off(48,B
Line(B-1,( - )49,B+1,( - )49,0
Line(B-1,( - )50,B+1,( - )50,0
Text(51,B-1,"     
End
End
T-N->T
(X=0->X
While N
N-1->N
3+6(T+Ans
Pxl-Off(A,Ans
Pxl-Off(A+2,Ans-1
Line(Ans,( - )A-1,Ans+2,( - )A-3,0
Line(Ans-2,( - )A-3,Ans-2,( - )A-30,0
Line(Ans+2,( - )A-3,Ans+2,( - )A-30,0
Line(Ans-1,( - )A-31,Ans+1,( - )A-31,0
Pxl-Off(48,Ans
Line(Ans-1,( - )49,Ans+1,( - )49,0
Line(Ans-1,( - )50,Ans+1,( - )50,0
Text(51,Ans-1,"     
End
End
If not(X
Then
S+1->S
"MARQU->Str0
"!
Else
(S-1)(S>0->S
"PERD->Str0
"...
End
Text(30,17,"VOUS "+Str0+"EZ UN POINT"+Ans
Pause
End
ClrHome
Output(3,6,"-FIN-
Output(5,5,"SCORE:
Output(5,11,S
Pause
Menu("REJOUER?","OUI",E4,"NON",E,"SORTIR",2
Lbl A
ClrHome
Menu("REFLEXE","LE JEU",A1,"LES REGLES",A2,"CHOIX DU JEU",0,"SORTIR",2
Lbl A1
ClrHome
Menu("CHOIX DU NIVEAU","FACILE",A4,"NORMAL",A5,"EXPERT",A6,"DIABOLIQUE",A9,"RETOUR",A,"SORTIR",2
Lbl A9
7->N
Goto A7
Lbl A4
30->N
Goto A7
Lbl A5
20->N
Goto A7
Lbl A6
10->N
Lbl A7
N->W
ClrHome
DelVar SOutput(4,6,"PRET?"
Pause
Lbl AP
ClrHome
For(I,1,14
Output(3,I,"-
Output(6,I,"-
End
For(I,1,8
Output(I,5,"I
Output(I,10,"I
End
1->T
Output(3,5,"+
Output(6,5,"+
Output(3,10,"+
Output(6,10,"+
While 1
Output(1,15,S
If T=1
Then
T+(N>10 and S>1->T
Else
1->T
End
N-(T=2->N
randInt(1,9->L
If L=1
Then
1->X
1->Y
72->L
End
If L=2
Then
1->X
6->Y
73->L
End
If L=3
Then
1->X
11->Y
74->L
End
If L=4
Then
4->X
1->Y
82->L
End
If L=5
Then
4->X
6->Y
83->L
End
If L=6
Then
4->X
11->Y
84->L
End
If L=7
Then
7->X
1->Y
92->L
End
If L=8
Then
7->X
6->Y
93->L
End
If L=9
Then
7->X
11->Y
94->L
End
1->G
For(I,0,3
Output(X,Y+I,"X
Output(X+1,I+Y,"X
End
DelVar IgetKey->K
While I<N and G
getKey->K
If K=L:DelVar G
I+1->I
Output(8,15," 
Output(8,15,N-I
If K=105:Goto AQ
If K=45:Goto 2
End
If G:Goto A8
S+1->S
For(I,0,3
Output(X,Y+I,"
Output(X+1,Y+I,"
End
End
Lbl A2
Output(1,15,"     LES REGLES                    APPUYEZ SUR LA  TOUCHE DES NUM     DE 1 A 9    CORRESPONDANT A LA CASE MARQUEE
Pause
ClrHome
Output(1,15,"     LES REGLES                    VOUS PERDEZ SI  LE COMPTEUR EN   BAS A DROITE   ARRIVE A ZERO!
Pause
ClrHome
Output(1,15,"     LES REGLES                   POUR METTRE SUR  PAUSE,APPUYEZ     SUR ENTRER     (LE MARQUAGE  CHANGE DE PLACE)
Pause
ClrHome
Output(4,5,"BON JEU!
Pause
ClrHome
Goto A
Lbl 1
ClrHome
Output(1,5,"REFLEXE          SNAKE         PING-PONG        MORPION        ALUMETTES         PENDU       PAR:MATHIEU41       V 1.0
Pause
ClrHome
Goto 0
Lbl A8
ClrHome
Output(4,4,"GAME OVER        SCORE:
Output(5,11,S
Pause
ClrHome
W->N
Menu("REJOUER?","OUI",A7,"NON",A,"SORTIR",2
Lbl AQ
Output(6,5,"SCORE:
Output(7,7,S
Menu("PAUSE","REPRENDRE",AP,"MENU",A,"QUITTER",A0
Lbl D
Menu("MORPION","LE JEU",DJ,"LES REGLES",DR,"CHOIX DU JEU",0,"SORTIR",DS
Lbl DR
ClrHome
Output(2,4,"LES REGLES                   FAITES UNE LIGNE     AVANT        L ADVERSAIRE
Pause
ClrHome
Output(1,4,"LES REGLES                     UTILISEZ LE    CLAVIER NUM OU LES FLECHES POURVOUS POSITIONNERET VALIDEZ AVEC      ENTRER
Pause
ClrHome
Output(4,5,"BON JEU!
Pause
ClrHome
Goto D
Lbl DJ
ClrHome
Output(4,4,"CHARGEMENT
For(I,1,106
0->L6(I
End
1->L6(27
1->L6(25
1->L6(26
1->L6(35
1->L6(46
1.1->L6(73
1.2->L6(74
1.3->L6(75
2.1->L6(83
2.2->L6(84
2.3->L6(85
3.1->L6(93
3.2->L6(94
3.3->L6(95
0->N
While N<=0
ClrHome
Input "NOMBRE DE PARTIES",N
End
ClrHome
ClrDraw
Line(40,( - )13,40,( - )55
Line(54,( - )13,54,( - )55
Line(26,( - )27,68,( - )27
Line(26,( - )41,68,( - )41
Text(3,33,"MORPION
Text(57,23,"PAR: MATHIEU 41
For(I,3,9
For(J,32,60
Pxl-Change(I,J
End:End
StorePic 1
2*N->dim(áVD
0->Y
0->D
0->Z
1->X
0->W
While N>W
W+1->W
0->C
ClrDraw
RecallPic 1
Text(25,2,"SCORE
Text(31,5,"J1:",D
Text(37,10,"X
Text(25,74,"SCORE
Text(31,77,"J2:",Z
Text(37,82,"O
Text(0,0,W,"/",N
[[0,0,0][0,0,0][0,0,0]]->[J]
0->K
0->B
1->L
1->M
While B!=9 and M and L
If X
Then
Line(0,( - )24,22,( - )24
Line(0,( - )44,22,( - )44
Line(0,( - )24,0,( - )44
Line(22,( - )24,22,( - )44
Line(72,( - )24,94,( - )24,0
Line(72,( - )44,94,( - )44,0
Line(72,( - )24,72,( - )44,0
Line(94,( - )24,94,( - )44,0
Else
Line(0,( - )24,22,( - )24,0
Line(0,( - )44,22,( - )44,0
Line(0,( - )24,0,( - )44,0
Line(22,( - )24,22,( - )44,0
Line(72,( - )24,94,( - )24
Line(72,( - )44,94,( - )44
Line(72,( - )24,72,( - )44
Line(94,( - )24,94,( - )44
End
B+1->B
0->P
0->Q
For(I,1,3
For(J,1,3
If P=0 and [J](I,J)=0
Then
J->P
I->Q
End:End:End
getKey->K
0->K
14(P-1)+28->T
( - )14(Q-1)-15->U
Line(T,U,T+10,U
Line(T,U,T,U-10
Line(T+10,U,T+10,U-10
Line(T,U-10,T+10,U-10
While not(K
getKey->K
If K=45
Goto 2
If L6(K+1
Then
P+(K=26)-(K=24)->P
Q-(K=25)+(K=34)->Q
If L6(K+1)>1
Then
int(L6(K+1->Q
10*fPart(L6(K+1->P
End
If P=0
3->P
If P=4
1->P
If Q=0
3->Q
If Q=4
1->Q
Line(T,U,T+10,U,0
Line(T,U,T,U-10,0
Line(T+10,U,T+10,U-10,0
Line(T,U-10,T+10,U-10,0
14(P-1)+28->T
( - )14(Q-1)-15->U
Line(T,U,T+10,U
Line(T,U,T,U-10
Line(T+10,U,T+10,U-10
Line(T,U-10,T+10,U-10
End
(K=105 and [J](Q,P)=0->K
End
If X
Then
14(P-1)+30->H
14(Q-1)+17->R
Line(H,( - )R,H+6,( - )R-6
Line(H+6,( - )R,H,( - )R-6
Else
14*(P-1)+33->H
14*(Q-1)+20->R
Circle(H,( - )R,4
End
Line(T,U,T+10,U,0
Line(T,U,T,U-10,0
Line(T+10,U,T+10,U-10,0
Line(T,U-10,T+10,U-10,0
1+(X=0->[J](Q,P
If B>=5
Then
For(I,1,3
If [J](I,1)=[J](I,2) and [J](I,2)=[J](I,3) and [J](I,3)=(X=0)+1 or [J](1,I)=(X=0)+1 and [J](1,I)=[J](2,I) and [J](3,I)=[J](2,I) or [J](1,1)=[J](2,2) and [J](3,3)=[J](2,2) and [J](2,2)=(X=0)+1 or [J](3,1)=[J](2,2) and [J](1,3)=[J](2,2) and [J](2,2)=(X=0)+1
Then
(X=0->L
(X=1->M
End:End:End
(X=0->X
End
D+(L=0->D
Z+(M=0->Z
If not(L
Then
Text(29,31,"                                 
Text(33,31,"                                 
Text(31,33,"J1 GAGNE!
1->áVD(W*2-1
0->áVD(W*2
Else
If not(M
Then
1->áVD(W*2
0->áVD(W*2-1
Text(29,31,"                                 
Text(33,31,"                                 
Text(31,33,"J2 GAGNE!
Else
Text(29,25,"                                                 
Text(33,25,"                                                 
Text(31,26,"-MATCH NULL-
0->áVD(W*2
0->áVD(W*2-1
End:End
Pause
End
ClrDraw
Text(0,30,"RESULTATS
Text(10,44,"J1
Text(10,69,"J2
Text(10,10,"MANCHE
Line(10,( - )17,85,( - )17
Line(30,( - )7,64,( - )7
Line(35,( - )9,35,( - )62
Line(60,( - )9,60,( - )62
StorePic 6
W->L
W/5->W
If fPart(W)>0
int(W)+1->W
0->T
For(I,1,W
ClrDraw
RecallPic 6
For(J,1,5
T+1->T
If T<=L
Then
Text(12+7*J,21,T
If áVD(T*2-1
Then
Text(12+7*J,47,"X
Else
Text(12+7*J,47,"-
End
If áVD(T*2
Then
Text(12+7*J,72,"X
Else
Text(12+7*J,72,"-
End
End
End
Pause
End
Line(10,( - )54,85,( - )54
Text(56,47,D
Text(56,72,Z
Pause
ClrDraw
If D!=Z
Then
Text(23,20,"LE VAINQUEUR EST:
If D>Z
1->X
If X
Then
Text(30,45,"J2
Else
Text(30,45,"J1
End
1->M
For(I,1,180
M*M->M
End
Line(43,( - )30,53,( - )37
Line(43,( - )37,53,( - )30
If X
Then
Text(38,45,"J1
Else
Text(38,45,"J2
End
Else
Text(27,29,"-EGALITE-
End
Pause
Menu("REJOUER?","OUI",DJ,"NON",D,"SORTIR",DS
Lbl B
Goto BM
Lbl B2
ClrHome
Output(1,4,"LES REGLES                   MANGEZ LES BLOCS EN EVITANT LES     MURS ET        OBSTACLES"
Pause
ClrHome
Output(1,4,"LES REGLES                      APPUYEZ SUR     ENTRER POUR  METTRE SUR PAUSE  ET SUR ANNUL    POUR QUITTER"
Pause
ClrHome
Output(5,5,"BON JEU!"
Pause
ClrHome
Goto BM
Lbl BM
ClrHome
Menu("SNAKE","LE JEU",B1,"LES REGLES",B2,"CHOIX DU JEU",0,"SORTIR",2
Lbl B1
ClrDraw
0->H
Menu("NIVEAU","FACILE",B4,"NORMAL",B5,"DIFFICILE",B6,"RETOUR",BM,"SORTIR",2
Lbl B6
If H=0
3->H
Pt-On(64,( - )42,3
Pt-On(30,( - )42,3
Pt-On(30,( - )20,3
Pt-On(64,( - )20,3
Pt-On(47,31,3
Lbl B5
If H=0
2->H
Line(35,( - )23,35,( - )39
Line(59,( - )39,59,( - )23
Line(35,( - )39,41,( - )39
Line(53,( - )39,59,( - )39
Line(35,( - )23,41,( - )23
Line(59,( - )23,53,( - )23
Lbl B4
If H=0
1->H
DispGraph
Line(23.5,( - )46.5,70.5,( - )46.5
Line(70.5,( - )46.5,70.5,( - )15.5
Line(23.5,( - )15.5,70.5,( - )15.5
Line(23.5,( - )15.5,23.5,( - )46.5
4->C:0->S:26->Z:5->N
getKey->K
{0,0,0,0,31->L5
{0,0,0,0,25->L6
Text(5,94/2-9,"SNAKE
Text(56,23,"PAR: MATHIEU 41
While 1
Text(48,36,"SCORE:
Text(48,58,S
Repeat pxl-Test(A,B)=0
randInt(16,45->A
randInt(25,70->B
End
Pxl-On(A,B
1->G
While pxl-Test(L5(N),L6(N))=0 and G
getKey->K
If K=25 or K=26 or K=34 or K=24
K->Z
If K=45 or K=105
Goto BB
Lbl B8
Pxl-On(L5(N),L6(N)
Pxl-Off(L5(N-C),L6(N-C)
N+1->N
L5(N-1)-(Z=25)+(Z=34)->L5(N
L6(N-1)-(Z=24)+(Z=26)->L6(N
G-(A=L5(N) and B=L6(N))->G
End
If G:Goto B9
S+1->S
Pxl-Off(A,B
1->T
C+1->C
For(I,N-C,N
L5(I->L5(T
L6(I->L6(T
T+1->T
End
T-1->N
End
Lbl B9
Disp
ClrHome
ClrDraw
Output(4,4,"GAME OVER
Output(5,5,"SCORE:
Output(5,11,S
Pause
If H=1
Menu("REESSAYER?","OUI",B4,"NON",B1
If H=2
Menu("REESSAYER?","OUI",B5,"NON",B1
If H=3
Menu("REESSAYER?","OUI",B6,"NON",B1
Lbl BB
If K=105
Goto B7
Goto 2
Lbl B7
StorePic 1
Text(28,38,"PAUSE"
Pause
ClrDraw
RecallPic 1
Goto B8
Lbl 2
ClrHome
ClrDraw
RecallGDB 0
AxesOn
Output(1,1,"     
Stop
Lbl C
Menu("PING-PONG","LE JEU",CA,"LES REGLES",CB,"RETOUR",0,"SORTIR",2
Lbl CB
Output(1,4,"LES REGLES                   PING-PONG EST UNJEU QUI SE JOUE  A 2 JOUEURS,LE   PREMIER A 11       GAGNE
Pause
ClrHome
Output(1,4,"LES REGLES                    L OBJECTIF EST  DE RENVOYER LA     BALLE A     L ADVERSAIRE EN   ESSAYANT DE    MARQUER UN BUT"
Pause
ClrHome
Output(1,4,"LES REGLES   PLUS VOUS FAITES D ECHANGES,PLUSLA BALLE VA VITE  ET PLUS VOTRE   RAQUETTE EST     DIFFICILE A      CONTROLER
Pause
ClrHome
Output(1,4,"      LES REGLES                     APPUYEZ SUR      en
Output(4,6,"trer POUR  METTRE SUR PAUSE  ET SUR ANNUL    POUR QUITTER
Pause
ClrHome
Output(4,5,"BON JEU!"
Pause
ClrHome
Goto C
Lbl CA
ClrDraw
getKey->K
If K=45
Goto 2
0->Z:0->Y:0->K
ClrHome
Output(4,4,"CHARGEMENT
6->P
1->O
For(I,1,106
If P=10
Then
6->P
(O=0->O
End
P+1->P
If O
Then
Output(5,P,"Ð
Else
Output(5,P,"
End
0->L5(I
0->L6(I
End
2->L5(93
( - )2->L5(73
2->L6(95
( - )2->L6(75
Text(57,23,"PAR: MATHIEU 41
Text(0,42,Y
Text(0,52,Z
Text(0,47,"-
For(I,0,6
For(J,41,55
Pxl-Change(I,J
End:End
Line(2,( - )8,93,( - )8
Line(93,( - )8,93,( - )55
Line(93,( - )55,2,( - )55
Line(2,( - )55,2,( - )8
1->M
ClrHome
DispGraph
Lbl C9
If Z=11 or Y=11
Goto C8
6->E:1->S
If M=0
Then
88->E
( - )1->S
End
Repeat R
randInt(( - )1,1->R
End
25->C:25->A:39->B:39->D:4->G:90->H:( - )32->F:1->L:1->M:1->V
Pt-On(E,F,2
Line(G,( - )A,G,( - )B
Line(H,( - )C,H,( - )D
Text(29,40,"PRET?
Pause
Text(29,40,"                   
While M and L
getKey+1->K
If K=46
Goto 2
If L5(K) or L6(K
Then
If K=73 and A-2>=9
Then
A-2->A
B-2->B
Pxl-On(A,G
Pxl-On(A+1,G
Pxl-Off(B+2,G
Pxl-Off(B+1,G
Else
If K=93 and B+2<=55
Then
A+2->A
B+2->B
Pxl-On(B,G
Pxl-On(B-1,G
Pxl-Off(A-2,G
Pxl-Off(A-1,G
Else
If K=75 and C-2>=9
Then
C-2->C
D-2->D
Pxl-Off(D+1,H
Pxl-Off(D+2,H
Pxl-On(C,H
Pxl-On(C+1,H
Else
If K=95 and D+2<=55
Then
C+2->C
D+2->D
Pxl-Off(C-1,H
Pxl-Off(C-2,H
Pxl-On(D-1,H
Pxl-On(D,H
End:End:End:End:End
For(I,1,V
If ( - )9<=F+R or F+R<=( - )54
( - )R->R
If E+S*2=4
Then
If ( - )F<=B and ( - )F>=A
Then
( - )S->S
V+1->V
R+(( - )F>=A and ( - )F<=A+4 and R!=3)-(( - )F<=B and ( - )F>=B-4 and R!=( - )3)->R
Else
0->L
Goto CX
End:End
If E+S*2=90
Then
If ( - )F<D and ( - )F>C
Then
( - )S->S
V+1->V
Else
0->M
Goto CX
End
End
Pt-Off(E,F,2
E+S->E
R+F->F
Pt-On(E,F,2
End:End
Lbl CX
For(I,1,2
Pt-Off(E,F,2
E+S->E
F+R->F
Pt-On(E,F,2
End
If M
Then
Z+1->Z
Text(0,52,2
For(I,0,5
For(J,52,55
Pxl-Change(I,J
End:End
Text(29,35,"BRAVO J2!
Pause
Else
Y+1->Y
Text(0,42,Y
For(I,0,5
For(J,42,45
Pxl-Change(I,J
End:End
Text(29,35,"BRAVO J1!
Pause
End
End
End
Text(29,35,"                                 
Pt-Off(E,F,2
Line(G,( - )A,G,( - )B,0
Line(H,( - )C,H,( - )D,0
End
Goto C9
Lbl C8
DelVar L5DelVar L6
Output(1,1,"
Menu("REJOUER?","OUI",CA,"NON",C,"SORTIR",2
Lbl F
ClrHome
Menu("PENDU","LE JEU",FJ,"LES REGLES",FR,"CHOIX DU JEU",0,"SORTIR",2
Lbl FR
ClrHome
Output(1,4,"LES REGLES                    DEVINEZ LE MOT  DE 12 LETTRES   MAX CHOISI PAR   L ADVERSAIRE  EN PROPOSANT DES    LETTRES
Pause
ClrHome
Output(1,4,"LES REGLES                     SI VOUS VOUS   FAITES PENDRE   VOUS PERDEZ LA      MANCHE
Pause
ClrHome
Output(4,5,"BON JEU!
Pause
ClrHome
Goto J
Lbl FJ
ClrHome
Output(1,1,"NOMBRE DE MANCHE
Disp ""
Input "=",P
0->M
0->Z
For(O,1,P
For(B,0,1
ClrDraw
If B
Then
Text(17,14,"J1 CHOISISSEZ UN MOT
Else
Text(17,14,"J2 CHOISISSEZ UN MOT
End
Text(25,20,"(12 LETTRES MAX)
K=0
26->dim(L4
Fill(0,L4
22->dim(L5
Fill(0,L5
106->dim(L6
Fill(0,L6
1->L6(42
2->L6(43
3->L6(44
4->L6(52
5->L6(53
6->L6(54
7->L6(55
8->L6(56
9->L6(62
10->L6(63
11->L6(64
12->L6(65
13->L6(66
14->L6(72
15->L6(73
16->L6(74
17->L6(75
18->L6(76
19->L6(82
20->L6(83
21->L6(84
22->L6(85
23->L6(86
24->L6(92
25->L6(93
26->L6(94
Line(13,( - )47,17,( - )47
0->I
0->K
While K!=105 or I<3
If I<11 and L6(K+1
Then
L6(K+1->A
A->L5(I+1
prgmDEF
Text(40,I*6+13,Str2
Line(I*6+13,( - )47,I*6+17,( - )47,0
I+1->I
If I!=11
Line(I*6+13,( - )47,I*6+17,( - )47
Else
If K=24 and I-1>=0 or K=26 and L5(I+1
Then
Line(I*6+13,( - )47,I*6+17,( - )47,0
I-(K=24)+(K=26->I
Line(I*6+13,( - )47,I*6+17,( - )47
Else
If K=23
Then
0->L5(I+1
Text(40,I*6+13,"     
End
End
End
getKey->K
End
ClrDraw
1->I
While L5(I
I+1->I
End
I-1->N
If B
Then
Text(10,7,"J2 PROPOSEZ UNE
Else
Text(10,7,"J1 PROPOSEZ UNE
End
Text(16,22,"LETTRE
Line(30,( - )31,35,( - )31
Text(16,72,"PENDU
Line(70,( - )23,92,( - )23
Line(70,( - )23,70,( - )47
Line(92,( - )23,92,( - )47
Line(70,( - )47,92,( - )47
8->V
Text(35,15,"MOT SECRET:
Text(51,7,"VIES RESTANTES:
Text(57,32,V
For(I,I-1,0,( - )1
If I
Text(42,33-I*3,"*
I-1->I
If I
Text(42,30+I*3,"*
End
0->G
Repeat G or not(V
0->K
0->C
0->D
Line(30,( - )31,35,( - )31
Repeat C and K=105
D*(D!=30)+1->D
If D=15
Line(30,( - )31,35,( - )31,0
If D=30
Line(30,( - )31,35,( - )31
getKey->K
If L6(K+1
Then
Line(30,( - )31,35,( - )31,0
L6(K+1->C
C->A
prgmDEF
Text(25,32,Str2
End
End
Line(30,( - )31,35,( - )31,0
If not(L4(C
Then
1->L4(C
0->E
For(I,1,N
If C=L5(I
Then
E+1->E
1->L5(N+I
Text(42,27-N*3+I*6," ",Str2
End
End
If E
Then
Circle(33,( - )28,4
Else
Line(30,( - )24,35,( - )31
Line(30,( - )31,35,( - )24
If V>4
Text(51,89-(V-5)*6,Str2
If V<=4
Text(57,95-V*6,Str2
V-1->V
Text(57,32,V
If V=7
Then
Pxl-On(28,76
Pxl-On(28,77
Pxl-On(28,78
Pxl-On(29,75
Pxl-On(30,75
Pxl-On(31,75
Pxl-On(33,76
Pxl-On(33,77
Pxl-On(33,78
Pxl-On(31,79
Pxl-On(29,79
Pxl-On(30,79
Pxl-On(32,79
Pxl-On(32,75
Else
If V=6
Then
Line(77,( - )34,77,( - )36
Pxl-On(33,73
Pxl-On(33,72
Pxl-On(34,73
Pxl-On(35,73
Pxl-On(35,74
Pxl-On(35,75
Pxl-On(36,75
Pxl-On(36,76
Pxl-On(36,78
Pxl-On(36,79
Pxl-On(35,79
Pxl-On(35,80
Pxl-On(35,81
Pxl-On(34,81
Pxl-On(33,81
Pxl-On(33,82
Else
If V=5
Then
Line(77,( - )37,77,( - )40
Pxl-On(40,76
Pxl-On(40,75
Pxl-On(41,75
Pxl-On(41,74
Pxl-On(41,73
Pxl-On(42,73
Pxl-On(43,73
Pxl-On(43,72
Pxl-On(40,78
Pxl-On(40,79
Pxl-On(41,79
Pxl-On(41,80
Pxl-On(41,81
Pxl-On(42,81
Pxl-On(43,81
Pxl-On(43,82
Else
If V=4
Then
Pxl-On(27,77
Pxl-On(26,77
Pxl-On(25,77
Else
If V=3
Then
Line(78,( - )25,87,( - )25
Else
If V=2
Then
Line(87,( - )26,87,( - )44
Else
If V=1
Then
Pxl-On(26,84
Pxl-On(27,85
Pxl-On(28,86
Else
If V=0
Then
Pxl-On(44,86
Pxl-On(44,85
Pxl-On(45,85
Pxl-On(45,84
Pxl-On(44,88
Pxl-On(44,89
Pxl-On(45,89
Pxl-On(45,90
End:End:End:End:End:End:End:End
End
1->G
For(I,N+1,N*2
G*L5(I->G
End
Pause
Text(22,28,"             
Text(26,28,"           
Text(28,28,"           
Else
Text(25,12,"DEJA PROPOSE!
Pause
Text(25,12,"                                               
End
End
ClrDraw
If V
Then
Text(20,37,"BRAVO!
Text(37,5,"LE MOT SECRET ETAIT BIEN:
Pause
If B
Then
M+V->M
Else
Z+V->Z
End
Else
Text(20,35,"DOMAGE!
Text(37,13,"LE MOT SECRET ETAIT:
End
Text(45,42-N*3,"-
Text(45,48+N*3,"-
N->I
For(I,1,N
L5(I->A
prgmDEF
Text(45,42-N*3+I*6,Str2
End
Pause
End
ClrDraw
Text(12,28,"MANCHE ",O,"/",P
Text(20,35,"SCORES:
Text(27,39,"J1=",Z
Text(34,39,"J2=",M
Pause
End
If M!=Z
Then
Text(44,23,"LE GAGNANT EST:
For(I,1,100
1->A
End
If M>Z
Then
Text(51,43,"J2
Else
Text(51,43,"J1
End
Else
Text(44,30,"-EGALITE-
End
Pause
ClrList L5
ClrList L6
Menu("REJOUER?","OUI",FJ,"NON",F,"SORTIR",2



Le programme ZBAR (pour supprimer l'indicateur en haut à droite):

Code
FDCB05DECD9547C9
End
0000
End



Le programme DEF (pour le pendu, qui n'utilise pas les listes (je ne savais pas faire à l'époque godgrace.gif )

Code
If A=1
"A->Str2
If A=2
"B->Str2
If A=3
"C->Str2
If A=4
"D->Str2
If A=5
"E->Str2
If A=6
"F->Str2
If A=7
"G->Str2
If A=8
"H->Str2
If A=9
"I->Str2
If A=10
"J->Str2
If A=11
"K->Str2
If A=12
"L->Str2
If A=13
"M->Str2
If A=14
"N->Str2
If A=15
"O->Str2
If A=16
"P->Str2
If A=17
"Q->Str2
If A=18
"R->Str2
If A=19
"S->Str2
If A=20
"T->Str2
If A=21
"U->Str2
If A=22
"V->Str2
If A=23
"W->Str2
If A=24
"X->Str2
If A=25
"Y->Str2
If A=26
"Z->Str2
Return



Comme je l'ai dit plus haut, j'ai encore beaucoup d'optimisations à faire, et j'aurais bientôt d'autres jeux à rajouter cupsmiley.gif

Normalement (mis à part le ping-pong), tout marche plus ou moins, mais si vous trouvez des bug, n'hésitez pas à me les signaler winkle.gif

Voici des liens pour les 83p:
Le programme principal
Le prgm DEF(Pour le Pendu)
Le programme ZBAR (ou ZNOLOAD)

[EDIT]
Ce que je dois encore faire:
_La séparation des 6 jeux en 6 prgm différents;
_Un programme DEF supprimé, remplacé par la fonction sub (Merci likakro winkle.gif );
_Un jeu en asm (mon premier cupsmiley.gif ).

----------------------
Pour vous aidez dans vos débuts (et même ensuite ^^) :
*Tuto Algo->Ti Basic (par Linkakro) : Traduisez vos algo (de type algobox) en prgm pour votre TI!
*Catalogue des emplacements et traductions (anglais/français) des fonctions sur la TI.
*Faites vos propres programmes de maths (par ash)

Et au fait: la politesse n'a jamais tué personne winkle.gif
 Adresse email Haut de page Bas de page 
 
linkakro



Autorisation : Membre
Nb de messages : 3738
Inscrit le : Lun 19 Oct 2009, 21:25
Posté le : Dim 09 Sep 2012, 19:07   Citer 


Citer : m@thieu41
PS: j'ai des 83p, mais je ne sais pas comment les mettre crazy.gif

Les mettre où ça ? Sur le forum ?
Il faut les uploader sur un hébergeur. Moi je suis satisfait de Médiafire.

La plupart des optimisations se font avec des fonctions qu'on n'invente pas. Il faut fouiner dans les tutoriels et le manuel.
Par exemple remplace DEF par sub("ABCDEFGHIJKLMNOPQRSTUVWXYZ",A,1->Str2

Personnellement je n'aime pas mélanger des jeux dans un seul programme.

Dans le jargon de ce forum, le programme ZBAR s'appelle ZNOLOAD cupsmiley.gif.

Bone chance pour la suite.

----------------------
ti82statfr: 2008, inscrit: 2009, ti84pocketfr: noël2011, ti30xbmultiview: iut 2012-2014
Perfectionniste, manque tact. Pas le temps de tout publier depuis 2011. Répond toujours aux questions. (rédigé juin 2014)

Pour tout le monde et surtout les débutants, quelques-uns des articles courants :
*Traductions Algorithmie/Ti-Basic.
*Caractères spéciaux sur Tout82
Les défauts du TI-Basic : Goto_versus_algo et DelVar/End/Lbl/guillemet/store
 Adresse email Haut de page Bas de page 
 
m@thieu41



Autorisation : Membre
Nb de messages : 848
Inscrit le : Mer 18 Juil 2012, 18:44
Posté le : Dim 09 Sep 2012, 19:45   Citer 


Citer : linkakro
Les mettre où ça ? Sur le forum ?
Il faut les uploader sur un hébergeur. Moi je suis satisfait de Médiafire.

C'est exactement ce que je voulais, merci winkle.gif

Citer : linkakro
Par exemple remplace DEF par sub("ABCDEFGHIJKLMNOPQRSTUVWXYZ",A,1->Str2

Je ne pense jamais à utiliser cette fonction, merci pour le tuyau cupsmiley.gif

Citer : linkakro
Personnellement je n'aime pas mélanger des jeux dans un seul programme.

En fait, c'est parce que c'est plus pratique d'avoir tous mes programmes de jeux réunis en un seul sur ma calto, plutôt que d'avoir 6 prgm différents, mais je vais le faire pour le forum, ça sera mieux en effet

Citer : linkakro
Bone chance pour la suite.

Merci bigmouth.gif

PS: une dernière chose: comment faire pour que lorsque je met un lien, ce soit un autre texte qui s'affiche (par exemple "le programme principal" au lieu de "http://www.mediafire.com/file/ic8vrvn2ltewx6v/JEUX.83p:")?

----------------------
Pour vous aidez dans vos débuts (et même ensuite ^^) :
*Tuto Algo->Ti Basic (par Linkakro) : Traduisez vos algo (de type algobox) en prgm pour votre TI!
*Catalogue des emplacements et traductions (anglais/français) des fonctions sur la TI.
*Faites vos propres programmes de maths (par ash)

Et au fait: la politesse n'a jamais tué personne winkle.gif
 Adresse email Haut de page Bas de page 
 
tapenad



Autorisation : Membre
Nb de messages : 197
Inscrit le : Jeu 17 Nov 2011, 13:20
Posté le : Dim 09 Sep 2012, 19:49   Citer 

exemple:
tout82
met comme ça ( sans les étoiles):
[*url=https://tout82.pages-perso.free.fr/]tout82[*/url]

----------------------
L’erreur est humaine, mais pour provoquer une vraie catastrophe, il faut un ordinateur.

je suis premier!!!

je m'aime.
 Adresse email Haut de page Bas de page 
 
m@thieu41



Autorisation : Membre
Nb de messages : 848
Inscrit le : Mer 18 Juil 2012, 18:44
Posté le : Dim 09 Sep 2012, 19:57   Citer 

Merci à toi, mais c'est la balise url, pas code crazy.gif

Citer
[*code=https://tout82.pages-perso.free.fr/]tout82[*/code]



----------------------
Pour vous aidez dans vos débuts (et même ensuite ^^) :
*Tuto Algo->Ti Basic (par Linkakro) : Traduisez vos algo (de type algobox) en prgm pour votre TI!
*Catalogue des emplacements et traductions (anglais/français) des fonctions sur la TI.
*Faites vos propres programmes de maths (par ash)

Et au fait: la politesse n'a jamais tué personne winkle.gif
 Adresse email Haut de page Bas de page 
 
tapenad



Autorisation : Membre
Nb de messages : 197
Inscrit le : Jeu 17 Nov 2011, 13:20
Posté le : Lun 10 Sep 2012, 20:35   Citer 

dsl j'edit...

----------------------
L’erreur est humaine, mais pour provoquer une vraie catastrophe, il faut un ordinateur.

je suis premier!!!

je m'aime.
 Adresse email Haut de page Bas de page 
 
m@thieu41



Autorisation : Membre
Nb de messages : 848
Inscrit le : Mer 18 Juil 2012, 18:44
Posté le : Mar 11 Sep 2012, 22:37   Citer 

Heu... je viens de me rendre compte que l indicateur d execution se ralume lorsque je passe sur l ecran graphique... c est normal? crazy.gif

----------------------
Pour vous aidez dans vos débuts (et même ensuite ^^) :
*Tuto Algo->Ti Basic (par Linkakro) : Traduisez vos algo (de type algobox) en prgm pour votre TI!
*Catalogue des emplacements et traductions (anglais/français) des fonctions sur la TI.
*Faites vos propres programmes de maths (par ash)

Et au fait: la politesse n'a jamais tué personne winkle.gif
 Adresse email Haut de page Bas de page 
 
Cytropus



Autorisation : Membre
Nb de messages : 407
Inscrit le : Lun 07 Nov 2011, 12:09
Posté le : Mer 12 Sep 2012, 14:12   Citer 

Tel que c'est fait, oui clown.gif .
Pour le faire disparaître définitivement, il faudrait remettre Send(9prgmZBAR à chaque fois que l'écran passe du graphique à l'autre et vis versa karate.gif

----------------------
Le nouveau site de tout82
 Adresse email Haut de page Bas de page 
 
m@thieu41



Autorisation : Membre
Nb de messages : 848
Inscrit le : Mer 18 Juil 2012, 18:44
Posté le : Ven 14 Sep 2012, 18:33   Citer 

crazy.gif
Merci! (je pensais que le prgm ZBAR supprimais l'indicateur durant tout le prgm vu que c'est ce qui se passe en Asm)

----------------------
Pour vous aidez dans vos débuts (et même ensuite ^^) :
*Tuto Algo->Ti Basic (par Linkakro) : Traduisez vos algo (de type algobox) en prgm pour votre TI!
*Catalogue des emplacements et traductions (anglais/français) des fonctions sur la TI.
*Faites vos propres programmes de maths (par ash)

Et au fait: la politesse n'a jamais tué personne winkle.gif
 Adresse email Haut de page Bas de page 
 
toinou91



Autorisation : Membre
Nb de messages : 21
Inscrit le : Sam 15 Sep 2012, 9:00
Posté le : Dim 30 Sep 2012, 20:11   Citer 

Eh bien ça va on peut dire que le programme est court ^^

 Adresse email Haut de page Bas de page 
 
m@thieu41



Autorisation : Membre
Nb de messages : 848
Inscrit le : Mer 18 Juil 2012, 18:44
Posté le : Dim 30 Sep 2012, 20:32   Citer 

laugh.gif
Je finis mon prgm ASM, et je sépare les différents jeux en plusieurs prgm crazy.gif

----------------------
Pour vous aidez dans vos débuts (et même ensuite ^^) :
*Tuto Algo->Ti Basic (par Linkakro) : Traduisez vos algo (de type algobox) en prgm pour votre TI!
*Catalogue des emplacements et traductions (anglais/français) des fonctions sur la TI.
*Faites vos propres programmes de maths (par ash)

Et au fait: la politesse n'a jamais tué personne winkle.gif
 Adresse email Haut de page Bas de page 
 
áVD
Invité
Posté le : Lun 03 Fév 2014, 19:06   Citer 

Salut, je comprend pas "áVD" dans le morpion. Qu'est-ce que c'est ?

PS: J'ai une TI-82 Stats.fr

  Haut de page Bas de page 
 
linkakro



Autorisation : Membre
Nb de messages : 3738
Inscrit le : Lun 19 Oct 2009, 21:25
Posté le : Lun 03 Fév 2014, 19:45   Citer 

Ce caractère "á" est le petit symbole "L" du menu 2nde+stat=liste
https://tout82.pages-perso.free.fr/forum/sujet.php?sujet=2502

----------------------
ti82statfr: 2008, inscrit: 2009, ti84pocketfr: noël2011, ti30xbmultiview: iut 2012-2014
Perfectionniste, manque tact. Pas le temps de tout publier depuis 2011. Répond toujours aux questions. (rédigé juin 2014)

Pour tout le monde et surtout les débutants, quelques-uns des articles courants :
*Traductions Algorithmie/Ti-Basic.
*Caractères spéciaux sur Tout82
Les défauts du TI-Basic : Goto_versus_algo et DelVar/End/Lbl/guillemet/store
 Adresse email Haut de page Bas de page 
 
m@thieu41



Autorisation : Membre
Nb de messages : 848
Inscrit le : Mer 18 Juil 2012, 18:44
Posté le : Mar 04 Fév 2014, 16:57   Citer 

Ah mes vieux programmes crazy.gif

----------------------
Pour vous aidez dans vos débuts (et même ensuite ^^) :
*Tuto Algo->Ti Basic (par Linkakro) : Traduisez vos algo (de type algobox) en prgm pour votre TI!
*Catalogue des emplacements et traductions (anglais/français) des fonctions sur la TI.
*Faites vos propres programmes de maths (par ash)

Et au fait: la politesse n'a jamais tué personne winkle.gif
 Adresse email Haut de page Bas de page 
 
áVD
Invité
Posté le : Mar 04 Fév 2014, 21:14   Citer 

Merci happy.gif

  Haut de page Bas de page 
 
Poster un nouveau sujet Poster une réponse





  Page générée en 6 requêtes