Advertisement
TimJSwan

Tim Swan's FALLDOWN in ti-Basic

Mar 28th, 2015
784
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. ClrHome
  2. {1,1,1,1}→L₁
  3. {1,1,1,1}→L₂
  4. For(A,1,4
  5. randInt(1,16→L₁(A)
  6. randInt(1,16→L₂(A)
  7. End
  8. 1→M
  9. 3→Y
  10. 8→X
  11. 3→T
  12. 8→S
  13. While 1
  14. M-1→M
  15. If M=0
  16. 8→M
  17. M+Y+1→R
  18. While R>8
  19. R-8→R
  20. End
  21. If fPart(R/2)=0
  22. Then
  23. Y-1→Y
  24. If Y=0
  25. Stop
  26. Y→T
  27. End
  28. If fPart(M/2)=0
  29. Then
  30. M/2→W
  31. randInt(1,16→L₁(W)
  32. randInt(1,16→L₂(W)
  33. " OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO→Str1
  34. Else
  35. "OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO →Str1
  36. End
  37. For(B,1,4
  38. M-2B→R
  39. While R<1
  40. R+8→R
  41. End
  42. (R-1)16+L₁(B→U
  43. (R-1)16+L₂(B→V
  44. If U>1
  45. sub(Str1,1,U-1)+" "→Str2
  46. If U<128
  47. Str2+sub(Str1,U+1,128-U)→Str2
  48. Str2→Str1
  49. If V>1
  50. sub(Str1,1,V-1)+" "→Str2
  51. If V<128
  52. Str2+sub(Str1,V+1,128-V)→Str2
  53. Str2→Str1
  54. For(H,1,3
  55. Output(Y,X,"θ
  56. If T≠Y≠S
  57. Output(T,S,"
  58. X→S
  59. Y→T
  60. 0→A
  61. getKey→A
  62. If A=26
  63. X+1→X
  64. If A=24
  65. X-1→X
  66. If X=17
  67. 1→X
  68. If X=0
  69. 16→X
  70. If Y<8
  71. Then
  72. M-Y→R
  73. While R<1
  74. R+8→R
  75. End
  76. R/2→W
  77. If fPart(W)=0
  78. Then
  79. Output(Y,L₁(W),"*
  80. Output(Y,L₂(W),"*
  81. If X=L₁(W)=L₂(W)
  82. Y+1→Y
  83. Else
  84. Y+1→Y
  85. End
  86. End
  87. End
  88. Output(Y,X,"θ
  89. End
  90. Output(1,1,Str1
  91. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement