Forum

Catégorie : Programmes
Forum : Les programmes des internautes
Vues : 2846
Réponses : 14
Type : discussion
Etat : réponses autorisées

Tierce

mad67 le 17/06/2007 à 13:59
voila il y a 2 mois pm dej a demande un jeu de tierce je l'ai fait et posté il a été supprimé la je me rattrape je le poste vite fait voila le lien badongo.
http://www.badongo.com/file/3457544 le code arrive.
mad67 le 02/07/2007 à 11:29
voila le code
Code
ClrHome
Output(4,4,"MADIAN CORP
Output(5,4,"PRESENTE
For(T,0,800
End
ClrHome
Output(4,4,"TIERCE"
For(T,0,800
End
ClrHome
Lbl 0
Menu("TIERCE","NEW GAME",1,"LOAD GAME",2,"INSTRUCTIONS",10,"QUITTER",11
Lbl 10
Disp "LA COTE DES","CHEVAUX EST","DONNE CHOISI EN","UN PARIE UNE","SOMME VOIT LA","COURSE ET SI","TON CHEVAL"
Pause
ClrHome
Disp "GAGNE PLUS","SA COTE EST","ELEVEE PLUS TU","GAGNE D'ARGENT"
Pause
ClrHome
Goto 0
Lbl 11
Stop
Lbl 1
50->X
Goto 2
Lbl 2
Disp "TU AS",X,"EUROS"
For(T,0,800
End
ClrHome
If X=0:Stop
randInt(2,10)->C
randInt(2,10)->F
randInt(2,10)->I
randInt(2,10)->L
randInt(2,10)->O
Output(1,1,"COTE DES CHEVAUX"
Output(2,1,"CHEVAL 1:
Output(2,10,12-C
Output(3,1,"CHEVAL 2:
Output(3,10,12-F
Output(4,1,"CHEVAL 3:
Output(4,10,12-I
Output(5,1,"CHEVAL 4:
Output(5,10,12-L
Output(6,1,"CHEVAL 5:
Output(6,10,12-O
Pause
ClrHome
Menu("PARIER SUR","CHEVAL 1",3,"CHEVAL 2",4,"CHEVAL 3",5,"CHEVAL 4",6,"CHEVAL 5",7)
Lbl 3
1->P
Goto 8
Lbl 4
2->P
Goto 8
Lbl 5
3->P
Goto 8
Lbl 6
4->P
Goto 8
Lbl 7
5->P
Goto 8
Lbl 8
ClrHome
Input "PARIER COMBIEN:",Q
If Q÷ ( ) 0 or Q>X
Goto 8
X-Q->X
ClrHome
20->A
0->B
25->D
0->E
30->G
0->H
35->J
0->K
40->M
0->N
ClrDraw
Lbl 9
Pxl-On(A,B)
Pxl-On(D,E)
Pxl-On(G,H)
Pxl-On(J,K)
Pxl-On(M,N)
randInt(1,C)->Á
If Áø1:B+1->B
randInt(1,F)->Á
If Áø1:E+1->E
randInt(1,I)->Á
If Áø1:H+1->H
randInt(1,L)->Á
If Áø1:K+1->K
randInt(1,O)->Á
If Áø1:N+1->N
If Bø95 and Eø95 and Hø95 and Kø95 and Nø95
Goto 9
Text(0,0,"EGALITE
If B>E and B>H and B>K and B>N
Text(0,0,"CHEVAL 1 GAGNE"
If E>B and E>H and E>K and E>N
Text(0,0,"CHEVAL 2 GAGNE
If H>B and H>E and H>K and H>N
Text(0,0,"CHEVAL 3 GAGNE
If K>B and K>E and K>H and K>N
Text(0,0,"CHEVAL 4 GAGNE
If N>B and N>E and N>H and N>K
Text(0,0,"CHEVAL 5 GAGNE
Pause
ClrDraw
If B>E and B>H and B>K and B>N and P=1
X+Q(12-C)->X
If E>B and E>H and E>K and E>N and P=2
X+Q(12-F)->X
If H>B and H>E and H>K and H>N and P=3
X+Q(12-I)->X
If K>B and K>E and K>H and K>N and P=4
X+Q(12-L)->X
If N>B and N>E and N>H and N>K and P=5
X+Q(12-O)->X
Goto 2

mad67 le 02/07/2007 à 12:09
est ce que je peux avoir des avis?
ratuss le 02/07/2007 à 12:37
oui : tu peux faire plus court :p
mad67 le 03/07/2007 à 08:48
ah bon je voi pas moi ou sa?
ratuss le 03/07/2007 à 11:18
partout ou il y a 5 fois la même chose...
mad67 le 04/07/2007 à 08:47
oui mais ou je vois pas moi.
ratuss le 04/07/2007 à 10:14
=> bah tu remplaces les variables par un grande liste ce qui te permet d'utiliser des for et de réduire considerablement la taille du prog :p ( glasses.gif glasses.gif glasses.gif )
mad67 le 04/07/2007 à 10:16
j'ai rien compris.
ratuss le 04/07/2007 à 10:21
bah en gros à la place de A tu mets L1(1)
à la place de B tu mets L1(2)
à la place de D tu mets L1(3)
à la place de E tu mets L1(4)
...


et ensuite :

Code
Pxl-On(A,B)
Pxl-On(D,E)
Pxl-On(G,H)
Pxl-On(J,K)
Pxl-On(M,N)


Code
for (Z,1,10,2
Pxl-On(L1(Z),L1(Z+1))
end


et tu fais ca pour tout... :p
mad67 le 04/07/2007 à 10:31
oui mais sa va il est pas trop long donc je vois pas d'utilité extreme a le faire
unknow le 04/07/2007 à 15:43
il est tout ton sukoban parce que jle voit pas
mad67 le 05/07/2007 à 08:39
bien sur vu kil y a un concours je risque de me faire copier.
unknow le 05/07/2007 à 12:00
ah c'est le prog du concour? ok...
mad67 le 05/07/2007 à 13:29
apres le concours je le poste a moins qu'avec 1 chance sur 1000 je gagne.