This is my second game and I think it's much cleaner than my first one, so let me know what you think of my version of Snake! And, if you have any suggestions for another classic game I could try to make I would love to hear them! (please be reasonable...)
Code:
Code:
ClrHome
Lbl T
If B>|LHIGH(1
B->|LHIGH(1
Output(4,8,"Highscore: "
Output(4,20,|LHIGH(1
Wait 1
ClrHome
DelVar KDelVar ADelVar BDelVar DDelVar E
1->dim(L1
1->dim(L2
randInt(1,10)+100(randInt(1,26->C
While K!=23
If C=D or not(D
Then
B+1->B
Output(10,1,B
Repeat not(max(L1=L2
randInt(1,10)+100(randInt(1,26->D
Fill(D,L2
End
Output(remainder(D,100),remainder(round(D/100,0),100),"O"
End
getKey->K
If K
Then
If K=25 and A!=1
~1->A
If K=34 and A!=~1
1->A
If K=24 and A!=100
~100->A
If K=26 and A!=~100
100->A
End
For(E,dim(L1),1,~1
L1(E->L1(E+1
End
B->dim(L1
C->L1(1
dim(L1->dim(L2
If C+A>2699 or remainder(C+A,100)>10 or C+A<100 or remainder(C+A,100)<1
Then
Goto T
Else
C+A->C
End
Output(remainder(L1(dim(L1)),100),remainder(round(L1(dim(L1))/100,0),100)," "
Output(remainder(C,100),remainder(round(C/100,0),100),"X"
Fill(C,L2
If max(L1=L2) and L1(dim(L1))!=L2(1) and A!=0
Goto T
End
ClrHome