∞ Snake ∞
Cls
Q=<99=>{1,Q}->List 5
Q>=100=>{1,1}->List 5
ViewWindow 1,127,1,1,63,1
{1,1,1,1,1,1,1,1,1,1}->List 1
{1,1,1,1,1,1,1,1,1,1}->List 2
{1,1,1,1,1,1,1,1,1,1}->List 3
{1,1,1,1,1,1,1,1,1,1}->List 4
0->A~Z
10->A
10->C
10->B
1->D
1->E
5->M
10->G
60->H
-5->I
1->Z
100->P
While 1=Z
P-1->P
Text B,A,"O"
Text list 2[D],List 1[D]," " //one space between quotations
A->List 1[C]
B->List 2[C]
If GetKey=73
Then -5->F
0->M
IfEnd
If GetKey=53
Then 5->F
0->M
IfEnd
If GetKey=64
Then -5=>M
0->F
IfEnd
If GetKey=62
Then 5->M
0->F
IfEnd
Text G,H,"X"
Text List 3[D], List 4[D]," " //one space between quotations
G->list 3[C]
H->List 4[C]
Int 7Ran#->K
If K=3
Then Int 4Ran#->L
0->I~J
L=1=>5->I
L=2=>-5->I
L=3=>5->J
L=0=>-5->J
IfEnd
G+I->G
H+J->H
A+F->A
B+M->B
C+1->C
D+1->D
H >= 125=>4->H
A >= 125=>4->A
H =< 3=>123->H
A =< 3=>123->A
G >= 62=>3->G
B >= 62=>3->B
G =< 3=>61->G
B =< 3=>61->B
C >= 11=>1->C
D >= 11=>1->D
For 1->N To 10
C =/= N=>A >= List 4[N]=>A =< List 4[N]+4=>B >= List 3[N]=>B =< List 3[N]+4=>0->Z
C =/= N=>H >= List 1[N]=>H =< List 1[N]+4=>G >= List 2[N]=>G =< List 2[N]+4=>2->Z
Next
WhileEnd
Z=0=>Locate 7,3,"COMP WINS"
If Z=2
Then P->Q
Locate 7,3,"YOU WIN"
Locate 1,6,"YOUR SCORE:"
Locate 12,6,P
Dim List 5->V
Locate 1,5,"HIGH SCORE:"
P->List 5[(Dim List5)-1]
SortA(List 5)
Dim List 5->V
Locate 12,5,List 5[V]
If P=List 5[V]
Then For 1->A To 50
Locate 6,7," " //10 spaces between the quotations
Locate 6,7,"HIGH SCORE"
Next
IfEnd
Instruções
Use as teclas direccionais são o 8 (cima); 4 (esquerda); 6 (direita); 2 (baixo).
Currentscore->List list#[(Dim List list#)-1) para prevenir erros de dimensão.
SortA(List list#)
List list#[Dim List list#] para guardar a pontuação máxima.


