.
par le Modo : persalteas :ClrDraw
:ZStandard
:ClrHome
:Horizontal -10
:Horizontal 10
:Vertical 10
:Vertical -10
:Text(5,31,"SERPENT"
:Text(15,12,"CREER PAR:MrMONKEY"
:Text(35,15,"TOUT DROIT RESERVE"
:Text(45,28,"2001/2002"
:Text(55,27,"SCORE:"
:Text(55,55,ÖMin
:Pause
:Lbl 8
:ClrHome
:ClrDraw
:ZStandard
:FnOff
:GridOff
:AxesOff
:1ü (
) L
:0ü (
) Á
:0ü (
) W
:21ü (
) T
:50ü (
) S
:1ü (
) V
:0ü (
) U
:Lbl X
:21ü (
) T
:50ü (
) S
:1ü (
) V
:0ü (
) U
:0ü (
) W
:Lbl 1
:0ü (
) Xmin
:94ü (
) Xmax
:1ü (
) Xscl
:0ü (
) Ymin
:62ü (
) Ymax
:1ü (
) Yscl
:Line(0,6,94,6
:Line(94,6,94,62
:Line(94,62,0,62
:Line(0,62,0,6
:Text(57,0,"SCORE:"
:Text(57,30,Á
:Text(57,50,"STAGE:"
:Text(57,80,L
:Goto 3
:Lbl 2
:getKeyü (
) K
:If K=0
:Goto N
:If K=25
:Then
:ú (
) 1ü (
) U
:0ü (
) V
:End
:If K=34:Then
:1ü (
) U
:0ü (
) V:End
:If K=26:Then
:1ü (
) V
:0ü (
) U:End
:If K=24:Then
:ú (
) 1ü (
) V
:0ü (
) U:End
:Lbl N
:T+Uü (
) T
:S+Vü (
) S
:If pxl-Test(T,S
:Goto L
:Pxl-On(T,S
:Goto 2
:Lbl 3
:int ((rand50)ü (
) X
:int ((rand94)ü (
) Y
:If pxl-Test(X,Y
:Then
:Goto 3
:Else
:Pxl-On(X,Y
:Goto 2
:End
:Lbl L
:If T=X and S=Y
:Then
:Goto P
:Else
:Goto M
:End
:Lbl P
:Á+10ü (
) Á
:W+1ü (
) W
:If W=L
:Then
:Goto 6
:Else
:Goto 1
:End
:Lbl 6
:L+1ü (
) L
:If L=2
:Goto A
:If L=3
:Goto B
:If L=4
:Goto C
:If L=5
:Goto D
:If L=6
:Goto E
:If L=7
:Goto F
:If L=8
:Goto H
:If L=9
:Goto I
:If L=10
:Goto J
:If L>10
:Goto G
:Lbl A
:ClrDraw
:Line(16,34,78,34
:Goto X
:Lbl B
:ClrDraw
:Line(23,50,23,20
:Line(70,50,70,20
:Goto X
:Lbl C
:ClrDraw
:Line(1,33,32,33
:Line(94,33,60,33
:Line(32,45,32,50
:Line(60,45,60,20
:Goto X
:Lbl D
:ClrDraw
:Line(10,35,83,35
:Line(46,15,46,53
:Goto X
:Lbl E
:ClrDraw
:Line(1,33,32,33
:Line(94,33,60,33
:Line(32,45,32,20
:Line(60,45,60,20
:Line(39,22,53,22
:Line(46,6,46,22
:Line(46,62,46,45
:Line(39,45,53,45
:Goto X
:Lbl F
:ClrDraw
:Line(17,6,17,27
:Line(32,6,32,27
:Line(47,6,47,27
:Line(62,6,62,27
:Line(77,6,77,27
:Line(17,62,17,42
:Line(32,62,32,42
:Line(47,62,47,42
:Line(62,62,62,42
:Line(77,62,77,42
:Goto X
:Lbl H
:ClrDraw
:Line(9,42,35,42
:Line(9,26,35,26
:Line(35,42,35,62
:Line(35,26,35,6
:Line(85,26,59,26
:Line(85,42,59,42
:Line(59,42,59,62
:Line(59,26,59,6
:Goto X
:Lbl I
:ClrDraw
:Line(0,42,85,42
:Line(9,26,94,26
:Line(46,6,46,20
:Line(46,62,46,48
:Goto X
:Lbl J
:ClrDraw
:Line(0,16,85,16
:Line(9,26,94,26
:Line(0,36,85,36
:Line(9,46,94,46
:Line(0,56,85,56
:Goto X
:Lbl G
:ClrDraw
:ClrHome
:Output(1,1,"FELICITATION!
:Output(3,1,"TU AS VAINCU"
:Output(5,1,"MON SERPENT!"
:Pause
:ClrHome
:Stop
:Lbl M
:If Á>ÖMin
:Áü (
) ÖMin
:Output(2,4,"GAME OVER!"
:Output(4,2,"REJOUER? (O/N)"
:Output(7,5,"SCORE:"
:Output(7,11,Á
:Lbl 5
:getKeyü (
) K
:If K=72
:Then
:ClrHome
:Goto 8
:End
:If K=71
:Then
:ClrHome
:ClrDraw
:Stop
:End
:Goto 5

:Lbl L
:If T=X and S=Y
:Then
:Goto P
:Else
:Goto M
:End
un jeu de serpent (pas celui des nokia) qui s'allonge tout le temps avec des niveaux de plus en plus difficile !! (version TI 82/83+)
mais vous connaissez pas un programme Snake? où on peut mettre des niveaux SVP :x Merci1ü (
) U
Menu(" SNAKE ","FACILE",AA,"MOYEN",AB,"DUR",AC,"QUITTER",QU)
Lbl AA
1ü (
) Q
50ü (
) R
Goto DE
Lbl AB
3ü (
) Q
30ü (
) R
Goto DE
Lbl AC
5ü (
) Q
15ü (
) R
Lbl DE
ClrDraw
0ü (
) Xmin:94ü (
) Xmax
0ü (
) Ymin:62ü (
) Ymax
AxesOff:ClrDraw
Line(60,0,60,60)
Line(60,60,0,60)
Line(0,0,60,0)
Line(0,0,0,60)
Text(3,63,"-SNAKE-")
Text(13,63,"SCORE:")
Text(23,63,0)
5ü (
) dim(L):5ü (
) dim(L‚)
1ü (
) P
1ü (
) A:0ü (
) B
5ü (
) M:0ü (
) Á
0ü (
) S:0ü (
) W
0ü (
) H
round(rand*20+2,0)ü (
) G
For(I,1,M)
6+Iü (
) L(I)
Gü (
) L‚(I)
Pt-On(2*(6+I),2G)
Pt-On(2*(6+I)+1,2G)
Pt-On(2*(6+I),2G+1)
Pt-On(2*(6+I)+1,2G+1)
End
1ü (
) U
Lbl SN
If S=0:Then
Lbl CB
round(rand*26+1,0)ü (
) N
round(rand*26+1,0)ü (
) O
If pxl-Test(62-2O,2N):Then
Goto CB
End
Pt-On(2N,2O)
If randInt(0,1):Then
Pt-On(2N+1,2O
Else
Pt-On(2N,2O+1)
End
Pt-On(2N+1,2O+1)
1ü (
) S
End
For(F,1,R):End
getKeyü (
) K
If K=23:Then
H xor 1ü (
) H
If H=1:Then
Text(33,63,"PAUSE")
Else
Text(33,63," ")
End
End
If H=0:Then
If K=24 and A=0:Then
ú (
) 1ü (
) A
0ü (
) B
End
If K=25 and B=0:Then
0ü (
) A
1ü (
) B
End
If K=26 and A=0:Then
1ü (
) A
0ü (
) B
End
If K=34 and B=0:Then
0ü (
) A
ú (
) 1ü (
) B
End
2L(P)ü (
) X
2L‚(P)ü (
) Y
Pt-Off(X,Y)
Pt-Off(X+1,Y)
Pt-Off(X,Y+1)
Pt-Off(X+1,Y+1)
P-1ü (
) L
If L=0:Then
Mü (
) L
End
L(L)+Aü (
) L(P)
L‚(L)+Bü (
) L‚(P)
If pxl-Test(62-2L‚(P),2L(P))=1:Then
If L(P)=N and L‚(P)=O:Then
W+Mü (
) W
Text(23,63,W)
Á+Qü (
) Á:0ü (
) S
If PøM and 1=0:Then
Lü (
) Lƒ:L‚ü (
) L„
For(I,P+1,M)
Lƒ(I)ü (
) L(I-P)
L„(I)ü (
) L‚(I-P)
End
For(I,1,P)
M-Pü (
) Z
Lƒ(I)ü (
) L(I+Z)
L„(I)ü (
) L‚(I+Z)
End
Mü (
) P
End
Else
Text(3,61,"GAME OVER")
Return
End
End
2L(P)ü (
) X
2L‚(P)ü (
) Y
Pt-On(X,Y)
Pt-On(X+1,Y)
Pt-On(X,Y+1)
Pt-On(X+1,Y+1)
P+1ü (
) P
If P>M:Then
If Á>0:Then
Á-1ü (
) Á
M+1ü (
) M
Mü (
) dim(L)
Mü (
) dim(L‚)
Else
1ü (
) P
End
End
End
Goto SN
Disp "ERREUR"
Lbl QU
Je suis impatient
1 -> U
Menu(" SNAKE ","FACILE",AA,"MOYEN",AB,"DUR",AC,"QUITTER",QU
Lbl AA
1 -> Q
50 -> R
Goto DE
Lbl AB
3 -> Q
30 -> R
Goto DE
Lbl AC
5 -> Q
15 -> R
Lbl DE
ClrDraw
0 -> Xmin:94 -> Xmax
0 -> Ymin:62 -> Ymax
AxesOff:ClrDraw
Line(60,0,60,60
Line(60,60,0,60
Line(0,0,60,0
Line(0,0,0,60
Text(3,63,"-SNAKE-
Text(13,63,"SCORE:
Text(23,63,0
5 -> dim(L1):5 -> dim(L2
Effvar BEffvar [théta]Effvar SEffvar WEffvar H1 -> P
1 -> A
5 -> M
Randint(2,22 -> G
For(I,1,M
6+I -> L1(I
G -> L2(I
Pt-On(12+2I,2G
Pt-On(13+2I,2G
Pt-On(12+2I,2G+1
Pt-On(13+2I,2G+1
End
1 -> U
Lbl SN
If not(S:Then
Lbl CB
Randint(1,27 -> N
N -> O
If pxl-Test(62-2O,2N:Then
Goto CB
End
Pt-On(2N,2O
If randInt(0,1:Then
Pt-On(2N+1,2O
Else
Pt-On(2N,2O+1
End
Pt-On(2N+1,2O+1
1 -> S
End
For(F,1,R:End
getKey -> K
If K=23:Then
not(H -> H
If H=1:Then
Text(33,63,"PAUSE
Else
Text(33,63," "
End
End
If not(H=0:Then
If K=24 and not(A=0:Then
Effvar B -1 -> A
End
If K=25 and non(B:Then
Effvar A1 -> B
End
If K=26 and not(A:Then
Effvar B1 -> A
End
If K=34 and not(B:Then
Effvar A -1 -> B
End
2L1(P -> X
2L2(P -> Y
Pt-Off(X,Y
Pt-Off(X+1,Y
Pt-Off(X,Y+1
Pt-Off(X+1,Y+1
P-1 -> L
If not(L
M -> L
A+L1(L -> L1(P
B+L2(L -> L2(P
If pxl-Test(62-2L2(P),2L1(P:Then
If L1(P)=N and O=L2(P:Then
W+M -> W
Text(23,63,W
[théta] +Q -> [théta]:0 -> S
If P[différend de] M and 1=0:Then
L1 -> L3:L2 -> L4
For(I,P+1,M
L3(I -> L1(I-P
L4(I -> L2(I-P
End
For(I,1,P
M-P -> Z
L3(I -> L1(I+Z
L4(I -> L2(I+Z
End
M -> P
End
Else
Text(3,61,"GAME OVER
Return
End
End
2L1(P -> X
2L2(P -> Y
Pt-On(X,Y
Pt-On(X+1,Y
Pt-On(X,Y+1
Pt-On(X+1,Y+1
P+1 -> P
If P>M:Then
If [théta]>0:Then
[théta]-1 -> [théta]
M+1 -> M
M -> dim(L1
M -> dim(L2
Else
1 -> P
End
End
End
Goto SN
Disp "ERREUR
Lbl QU