J'ai cherché diverses programmes de jeu (affaires dans mon lycée) et je suis tombé sur une version de 2048.
Après quelques minutes, je me retrouve devant une version txt de ce programme
Et là, malheur
Il est écrit en ti83pc.
Du coup, est-ce que quelqu'un arriverai à traduire ?
Merci d'avance :3
Voila le programme en question
- Code: Select all
DelVar Á
ClrDraw:AxesOff
0üTmin:0üÁmin
1üTblInpu:1üâ
DelVar [A]{4,4üdim([A]
Lbl 9
ClrHome
Menu(" Design?","Default",D,"Manual",M,"Random",R
Lbl R
randInt1,3üM
randInt1,7üL
Goto 2
Lbl D:2üL:2üM:Goto 2
Lbl M
Disp "Type?1=Ò/2=Ð/3=Ñ
Input "",M
If not(max(M={1,2,3:Goto 9
Disp "Size?
Input "",L
abs(LüL
Lbl 2
ClrDraw
DelVar LDelVar L‚
randInt1,4üV
randInt1,4üW
For(A,12,62,L
Pt-On(22,A,M
Pt-On(48,A,M
Pt-On(72,A,M
End
For(A,0,94,L
Pt-On(A,24,M
Pt-On(A,38,M
Pt-On(A,52,M
End
StorePi1
DelVar B
{1,26,51,76üL
{0,13,28,42üL‚
Repeat K=72
getKeyüK
If K=94:Goto Q
Text(1,1,"Menu>
Text(13,27,"Play
Text(28,52,"Optn
Text(43,78,"Exit
Text(55,10,"*****2048*****
If K=83:Goto 9
End
ClrDraw:RecallP1
DelVar Z2üA:2üB
Lbl 1
DelVar [A]{4,4üdim([A]
ClrDraw:RecallP1
2ü[A](randInt1,4),randInt1,4)
Lbl 5
For(A,1,4
For(B,1,4
Text(L‚(A),L(B)," "
If [A](A,B:Text(L‚(A),L(B),[A](A,B
End:End
Repeat K=45
getKeyüK
Text(55,40,Á
If K=45:Stop
If max(K={24,25,26,34:Then
If K=26 or K=34:Then
1üI:3üJ:1üL
End
If K=24 or K=25:Then
4üI:2üJ:ú1üL
End
If K=26 or K=24:Then
For(W,1,4
For(V,I,J,L
If [A](W,V)=[A](W,V+L):Then
[A](W,V)+[A](W,V+L)ü[A](W,V+L:0ü[A](W,V
Á+2[A](W,V+LüÁ
End
If not([A](W,V+L:Then
[A](W,V)ü[A](W,V+L
0ü[A](W,V
End
End:End:End
If K=34 or K=25:Then
For(W,1,4
For(V,I,J,L
If [A](V,W)=[A](V+L,W:Then
[A](V,W)+[A](V+L,W)ü[A](V+L,W
0ü[A](V,W
Á+2[A](V+L,WüÁ
End
If not([A](V+L,W:Then
[A](V,W)ü[A](V+L,W
0ü[A](V,W
End
End:End:End
Repeat not([A](E,F
randInt1,4üE
randInt1,4üF
End
2ü[A](E,F
Goto 5
End:End:End