0

I've been trying to make Snake in TI-BASIC for a few hours now and I was having a really hard time getting the snake the grow properly. So far I have:

ClrHome
5->Y
4->X
0->L
256->dim(|LSNAKE
X->T
1->A
While 1
    ClrHome
    
    
    Output(Y,X,"O"
    
    
    
    If L>0:Then
        For(Z,1,L
            Output(|LSNAKE(V),|LSNAKE(Z),"O"
        End
    End
    
    A->V
    Y->|LSNAKE(A)
    A+1->A
    X->|LSNAKE(A)
    A->Z
    A+1->A
    Input D
    
    If D=25:Then
        Y-1->Y
    End
    
    If D=34:Then
        Y+1->Y
    End
    
    If D=24:Then
        X-1->X
    End
    
    If D=26:Then
        X+1->X
    End
    
    Output(7,1,|LSNAKE(1)
    Output(8,1,|LSNAKE(2)
    L+1->L
    
End

The ideas is that the previous coordinates are put into the list SNAKE using the A variable and that V and Z will recall the values. But it's not working out. The only snake games I can find online in TI-BASIC are extremely dense and have no comments. So I'm hoping I can get help here.

GSerg
  • 76,472
  • 17
  • 159
  • 346

1 Answers1

0

It looks like you're using

Input D

When you mean to use

getKey->D

There maybe be other problems I'm not seeing too.

Quaris
  • 361
  • 2
  • 9