How did you manage to make the ball reflect off the fortress and then make it disappear? I would like to know the code on how to do it.
Date: 05 Jun 2014 17:48
Number of posts: 8
RSS: New posts
:If A=2 // If ball's Y co-ordinate is 2
:While not(W=16 // Keep repeating until W is 16
:W+1→W // Add 1 to W
:If B=W // If ball's X co-ordinate equals W
:If ⌊1(W)=0 // If the wall above the ball is already destroyed
:Pause "YOU WON PART 2! // Tell the player he won
:Output(100,100,"P // Stop the program
:If ⌊1(W)=1 // If the wall above the ball isn't destroyed
:0→⌊1(W // Destroy the wall above the ball
:If A=1 // If the ball's Y co-ordinate is 1
:-D→D // Change the ball's direction
Hmmm… Didn't feel like copying the code, but I can see some optimizations right off the bat:
:While not(W=16 :W+1→W :If ⌊1(W)=1 :Then :Output(1,W,"- :End :End
Ever heard of the repeat loop?
Repeat W=16 //Basically, this equals "While not(...)" W+1->W If L1(W //Returns 1 if a value is present. Also, if you have a "If L1(W)=0", that can be "If not(L1(W" Output(1,W,"- //You don't need a Then statement because there is only one command after the If! I saw this quite a bit. End
In lines like Line 3:
What is the [ looking thing (second to last symbol).