it has long been my goal to create a snake program, and during my chemistry final i figured a way out… im not too much of a programmer, btw. anyway, it runs kinda slow and i need help speeding it up.
You move the snake with arrow keys, and to make it grow you push 2nd (i will change this to eating dots later)
X and Y are the cord. of the head of the snake
A and B are the cord. of the end of the snake
W is the list i use, refered to as LW cause idk how to make that little "L" thing
At the start, all vars are set to zero, except
I, which is set to 9
S, which is set to 1 and
Q, which is set to 3
Lbl 5 While C does not equal 105 DelVarC Repeat C does not equal 0 getKey->C If N=150 DelVar N If L=150 DelVar L N+1 ->N Q->LW(N) X+S->X Y+T->Y pxl-Test(31-Y,47+X)->D Pt-On(X,Y) If I<1 Then L+1->L LW(L)->Z A-1/3Z^3+2Z^2-8/3Z -> A B+round(1/3Z^3-3Z^2+23/3Z-5,0) -> B End Pt-Off(A,B) I-1 -> I If D=1 Goto GO End If C=21 Then 2 ->I Goto 5 End 0 -> S 0 -> T If C=24 -1 ->S If C=25 1->T If C=26 1->S If C=34 -1->T C-23->Q If Q=11 4->Q End Lbl GO Disp "Death"