如何在TI-BASIC中让蛇生长
我已经尝试在 TI-BASIC 中制作 Snake 几个小时了,但我很难让蛇正常生长。到目前为止,我的
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
想法是,使用 A
变量将先前的坐标放入列表 SNAKE
中,并且 V
和 Z
将调用这些值。但这并不奏效。我能在 TI-BASIC 中在线找到的唯一贪吃蛇游戏非常密集且没有任何评论。所以我希望我能在这里得到帮助。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您正在使用
当您打算使用
时可能还有其他问题我也没有看到。
It looks like you're using
When you mean to use
There maybe be other problems I'm not seeing too.