Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ClrHome
- 0→G
- 1→C
- 1→S
- 3→X
- 3→Y
- 3→V
- 3→U
- 2→D
- 0→T
- DelVar [A]
- {10,26→dim([A]
- For(F,1,5
- randInt(1,10→O
- randInt(1,26→P
- 5→[A](O,P
- Output(O,P,"*
- End
- While C and G≠45
- Output(Y,X,0
- If [A](Y,X)>1
- Then
- S+1→S
- 0→T
- While [A](O,P)≠0
- randInt(1,10→O
- randInt(1,26→P
- If [A](Y,X)≠5 or S≥200
- 0→C
- End
- 5→[A](O,P
- Output(O,P,"*
- End
- getKey→G
- If G=24 and D≠2
- 4→D
- If G=25 and D≠3
- 1→D
- If G=26 and D≠4
- 2→D
- If G=34 and D≠1
- 3→D
- D→[A](Y,X
- X+(D=2)-(D=4→X
- Y+(D=3)-(D=1→Y
- If Y>10 or Y<1 or X>26 or X<1
- 0→C
- Output(V,U," //one space
- If T=1
- Then
- [A](V,U→K
- 0→[A](V,U
- U+(K=2)-(K=4→U
- V+(K=3)-(K=1→V
- End
- 1→T
- End
- ClrHome
- Output(4,5,"GAME OVER
- If S≥200
- Output(4,5,"YOU WIN!!
- Output(5,5,"SCORE:
- Output(5,12,S
- "
Advertisement
Comments
-
- How do I make this work on a TI-84 Plus not a TI-84 Plus CE
-
- Replace every 10 with an 8 and every 26 with a 16. Courtesy to @Flaidan (duck pfp) on YouTube for giving this.
-
Comment was deleted
-
- Yaa! Know it is work. And i fixed speed with your code For
- (K,1,50 (bigger number (50) is a slower Snake
- END
- So cool! :)
-
- doesn't work
-
- What device are you using?
-
- I am using the TI-84 Plus Silver edition and mine just puts stars and a zero on the screen and stops the program.
-
- I'm having trouble with the snake just being infinite from the start. Did I miss a line somewhere?
-
- it doesn't work
-
- Works but I when I click arrow left it don’t work
-
- why cant I move right?
Add Comment
Please, Sign In to add comment
Advertisement