Autorisation : Membre
Nb de messages : 8
Inscrit le : Jeu 21 Oct 2010, 16:21
Posté le : Jeu 04 Nov 2010, 16:42
bonjour, voilà j'aifait un programme de fléchette en graphique vous pourriez me dire ce que vous en pensez.
Code
0->S
lbl pp
eff dessin
ent aleat(1,5)->A
0->D
if A=1
then
-2->C
end
if A=2
then
-14->C
end
if A=3
then
-26->C
end
if A=4
then
-38->C
end
if A=5
then
-50->C
end
ent aleat(1,5)->A
if A=1
then
-2->E
end
if A=2
then
-14->E
end
if A=3
then
-26->E
end
if A=4
then
-38->E
end
if A=5
then
-50->E
end
94->J
C-6->X
0->F
10->G
9->H
8->I
0->M
X->R
X->U
F->N
G->O
H->P
I->Q
ligne(D,C,D,C-12
cercle(D,C-6,6
ligne(J,E,J,E-12)
ligne(F,X,G,X
ligne(H,X-1,H,X+1
ligne(I,X-2,I,X+2
repeat K>91 et K<95 ou K>81 et K<85 ou K>71 et K<75
code touche->K
end
if K=92
then
repeat M=4
M+1->M
F+21->F
G+21->G
I+21->I
H+21->H
X+12->X
ligne(F,X,G,X
ligne(H,X-1,H,X+1
ligne(I,X-2,I,X+2
ligne(N,R,O,R,0
ligne(P,R-1,P,R+1,0
ligne(Q,R-2,Q,R+2,0
pt-on(0,U
pt-on(6,U
X->R
X->U
F->N
G->O
H->P
I->Q
end
pause
goto X
endlbl X
if X=E-6
then
S+1->S
goto 99
else
output(4,1,3VOUS AVEZ PERDU
output(5,2,"AVEC POINTS
output(5,7,"S
pause
effecr
output(1,1,"
end
bon pour aujord'hui j'ai plus envie de continuer, pour ceux qui voudrait essayer je vous donne les dernieres lignes du programme vous pourrez tester au moin avec la touche 1
si vous avez des idées pour le racourcir ça m'aiderait je mettrai le reste dans le courant de la semaine prochaine
Autorisation : Membre
Nb de messages : 3767
Inscrit le : Lun 19 Oct 2009, 21:25
Posté le : Jeu 04 Nov 2010, 23:01
Remplace
Code
ent aleat(1,5)->A
if A=1
then
-2->C
end
if A=2
then
-14->C
end
if A=3
then
-26->C
end
if A=4
then
-38->C
end
if A=5
then
-50->C
end
ent aleat(1,5)->A
if A=1
then
-2->E
end
if A=2
then
-14->E
end
if A=3
then
-26->E
end
if A=4
then
-38->E
end
if A=5
then
-50->E
end
---------------------- 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)