Hey guys, i'm trying to write up a snake game for my TI-84
Till now i got this:
ClrHome
4->A
4->B
1->C
While C=1
getkey->Z
If Z=/0
Then
Output(A,B,""
End
If Z=34
Then
A+1->A
End
If Z=24
Then
B-1->B
End
If B>9
Then
1->B
End
If B<1
Then
9->B
End
If A>8
Then
1->A
If A<1
Then
8->A
End
Output(A,B,"+"
randInt(1,8)->N
randInt(1,9)->O
Output(N,O,"."
If Z=105
Then
0->C
End
Output(1,10,"SCORE"
D=0
If N=A and O=B
Then
D+1->D
Output(3,10,D
End
End
ClrHome
My problems are:
I don't know how to put the snake moving
I don't know how to make the snake grow bigger by each "." it eats
I don't know how to make each dot appear individually; they all appear like FLOOD.
Thanks!, and bear in mind that i only started learning BASIC by looking at already made programs tuesday ;)
Edited, i missed the "While C=1"
Till now i got this:
ClrHome
4->A
4->B
1->C
While C=1
getkey->Z
If Z=/0
Then
Output(A,B,""
End
If Z=34
Then
A+1->A
End
If Z=24
Then
B-1->B
End
If B>9
Then
1->B
End
If B<1
Then
9->B
End
If A>8
Then
1->A
If A<1
Then
8->A
End
Output(A,B,"+"
randInt(1,8)->N
randInt(1,9)->O
Output(N,O,"."
If Z=105
Then
0->C
End
Output(1,10,"SCORE"
D=0
If N=A and O=B
Then
D+1->D
Output(3,10,D
End
End
ClrHome
My problems are:
I don't know how to put the snake moving
I don't know how to make the snake grow bigger by each "." it eats
I don't know how to make each dot appear individually; they all appear like FLOOD.
Thanks!, and bear in mind that i only started learning BASIC by looking at already made programs tuesday ;)
Edited, i missed the "While C=1"