Autorisation : Membre
Nb de messages : 1561
Inscrit le : Mer 01 Mar 2006, 20:41
Posté le : Jeu 12 Oct 2006, 6:53
Salut, perso je suis en train d'en faire un, et que je trouve plutot reussi pour le moment ... l'avantage c'est qu'il est rapide et ne prend que très peu de place (400 octets) .
Autorisation : Membre
Nb de messages : 1561
Inscrit le : Mer 01 Mar 2006, 20:41
Posté le : Mar 17 Oct 2006, 6:54
Voici le code (pour les stat en francais)
Version 0.5 (600 octets)
Code
EffDessin
0=>Xmin
94=>Xmax
(-)62=>Ymin
0=>Ymax
AxesNAff
FonctNAff
6=>A:8=>B:44=>C:77=>D:1=>E:2=>N:0=>O
1=>dim(Liste6
If .7349=partDéc(Liste6(1:Liste6(1=>O
EffListe Liste4
EffListe Liste5
99=>dim(Liste4
99=>dim(Liste5
For(ø,1,6,1.4
Ligne(88,(-)ent(ø),6,(-)ent(ø)
End
Ligne(6,(-)57,88,(-)57
Ligne(88,(-)56,88,(-)6
Ligne(6,(-)6,6,(-)56
Texte(0,13," SCORE : 3
Texte(0,53," HIGH : ",ent(O
Lbl 5
(-)8-5ent(NbrAléat10=>I
8+5ent(NbrAléat16=>J
If pxl-Test((-)I,J:Goto 5
Ligne(J,I,J+2,I-2
Ligne(J,I-2,J+2,I
Goto 3
Lbl 2
6+50partDéc((A+C)/50=>A
8+80partDéc((B+D)/80=>B
If pxl-Test(A+2,B:Goto 4
Texte(A,B,"º
Lbl 3
arrondi(1+NpartDéc(E/N),0=>E
Texte(Liste4(E),Liste5(E),"[4 espaces]
A=>Liste4(E:B=>Liste5(E
codeTouch(=>K
If K=0:Goto 2
If D=72:Then
If K=24:67=>D
If K=26:77=>D
If 1=abs(K-25:44=>C
Goto 2:End
If C[pas égal à]44:Goto 2
If K=25:39=>C
If K=34:49=>C
If K=25 ou K=34:72=>D
Goto 2
Lbl 4
Texte(A,B,"º
Ligne(B+1,(-)A-3,B+2,(-)A-2
If (-)I[pas égal à]A+2 ou J[pas égal à]B ou N=99:Goto Q
N+1=>N
Texte(0,38,N+1
Goto 5
Lbl Q
If N+1>O:N+1.7349=>Liste6(1
Texte(27,31,"GAME OVER
Pause
EffEcr
Output(2,5,"SNAKE NN
Output(3,3,"VERSION 1.0
Output(5,5,"NOUFNOUF
Output(6,5,"06/10/06
Version 1.0 (1200 octets) : avec des niveaux en +
Code
EffDessin
0=>Xmin
94=>Xmax
(-)62=>Ymin
0=>Ymax
AxesNAff
FonctNAff
16=>A:18=>B:44=>C:77=>D:1=>E:2=>N:0=>O
7=>dim(Liste6
1=>P
Goto S
Lbl R
EffEcr:Disp "BLOQUE
Pause
Lbl S
Menu("NIVEAU","",A,"",B,"",C,"",D,"",E,"",F,"",G
Lbl E
If 39>Liste6(4:Goto R
5=>P:38=>B
For(ø,23,68,5
For(Z,13,16
Ligne(ø,Z-ø,ø+3,Z-ø
End
End
Goto A
Lbl F
If 39>Liste6(5:Goto R
26=>A:6=>P
For(ø,42,45
Ligne(8,20-ø,86,20-ø
Ligne(8,(-)ø,27,(-)ø
Ligne(67,(-)ø,86,(-)ø
Ligne(ø-14,(-)7,ø-14,(-)21
Ligne(ø-14,(-)32,ø-14,(-)57
Ligne(ø+21,(-)32,ø+21,(-)57
Ligne(ø+21,(-)7,ø+21,(-)10
End
Goto A
Lbl G
If 39>Liste6(6:Goto R
6=>A:7=>P
For(ø,1,15
13+5ent(NbrAléat14=>I
5ent(NbrAléat8+3=>J
For(Z,0,3
Ligne(I,Z-J,I+3,Z-J
End
End
Goto A
Lbl C
3=>P
Lbl D
If 39>Liste6(3-ent(P/3:Goto R
For(ø,7,10
For(Z,0,45,45
Ligne(8,(-)ø-Z,41,(-)ø-Z
Ligne(53,(-)ø-Z,86,(-)ø-Z
End
For(Z,1,76,75
Ligne(ø+Z,(-)11,ø+Z,(-)25
Ligne(ø+Z,(-)37,ø+Z,(-)51
End:End
If P=3:Goto A
3=>P
Lbl B
If 39>Liste6(P:Goto S
For(ø,27,35
Ligne(28,(-)ø,66,(-)ø
End
Ligne(32,(-)31,62,(-)31,0
P+1=>P
Lbl A
If .7349=partDéc(Liste6(P:Liste6(P=>O
EffListe Liste4
EffListe Liste5
99=>dim(Liste4
99=>dim(Liste5
For(ø,1,6,1.4
Ligne(88,(-)ent(ø),6,(-)ent(ø)
End
Ligne(6,(-)57,88,(-)57
Ligne(88,(-)56,88,(-)6
Ligne(6,(-)6,6,(-)56
Texte(0,13," SCORE : 3
Texte(0,53," HIGH : ",ent(O
Lbl 5
(-)8-5ent(NbrAléat10=>I
8+5ent(NbrAléat16=>J
If pxl-Test((-)I,J:Goto 5
Ligne(J,I,J+2,I-2
Ligne(J,I-2,J+2,I
Goto 3
Lbl 2
6+50partDéc((A+C)/50=>A
8+80partDéc((B+D)/80=>B
If pxl-Test(A+2,B:Goto 4
Texte(A,B,"º
Lbl 3
arrondi(1+NpartDéc(E/N),0=>E
Texte(Liste4(E),Liste5(E),"[4 espaces]
A=>Liste4(E:B=>Liste5(E
codeTouch(=>K
If K=0:Goto 2
If D=72:Then
If K=24:67=>D
If K=26:77=>D
If 1=abs(K-25:44=>C
Goto 2:End
If C[pas égal à]44:Goto 2
If K=25:39=>C
If K=34:49=>C
If K=25 ou K=34:72=>D
Goto 2
Lbl 4
Texte(A,B,"º
Ligne(B+1,(-)A-3,B+2,(-)A-2
If (-)I[pas égal à]A+2 ou J[pas égal à]B ou N=99:Goto Q
N+1=>N
Texte(0,38,N+1
Goto 5
Lbl Q
If N+1>O:N+1.7349=>Liste6(P
Texte(27,31,"GAME OVER
Pause
EffEcr
Output(2,5,"SNAKE NN
Output(3,3,"VERSION 1.0
Output(5,5,"NOUFNOUF
Output(6,5,"06/10/06
Ps : ø = alpha+3
@+
--- Edit 17 mars 2014 par Linkakro ---
Méfiez-vous du "ent(0", c'est bien la lettre O, pas le nombre zéro 0.
Il faut corriger le Goto S suivant en Goto R. (voir pages 53 et 54) Sinon le second niveau renvoi au menu.
Code
Lbl B
If 39>Liste6(P:Goto S /// If 39>Liste6(P:Goto R
Il faut ajouter un guillemet sur TI82 (ni stats ni plus) en fin de Text pour que le Lbl 3 puisse fonctionner. (voir pages 55 et 56)
Code
Texte(A,B,"º" //// guillemet final indispensable sur TI82 non-stat
Lbl 3
EDIT 10/09/2014 : Xmin est dans le menu var+1. J'en ai assez de le répéter dans la fin du sujet.
Autorisation : Membre
Nb de messages : 1561
Inscrit le : Mer 01 Mar 2006, 20:41
Posté le : Dim 22 Oct 2006, 20:32
Citer
hum....
Citer
heu ... au fait, comment tu sias si un prog de 82 est compatible avec la 83 ou si un un prog de 83 est compatible avec une 82
Il y a 2 3 fonctions supplementaires sur une ti 83 : par exemple tu peux utiliser 2 lettres dans un lbl, y a la commande RandInt, les "(" ajoutées à pas mal de fonctions etc etc...
Ps : en general, un programme compatible ti 82 est compatible 83