The Absolute Best Home Movement Program
Michael2_3B 06 Jun 2020 20:28
So I made this simple home movement program for the CE, it allows you to move the X around the home screen and actually runs at a good rate. I'm wondering though if you could make the code better worse without affecting the speed and size too much. It's not the best, so if you can make it more confusing I'd love to see what you have to offer.
(Note, this is in SourceCoder3 format) Here's the code:
For(I,4,~1+int(1.59154943092*pi
End
I+BROWN/int([e]->I%
not(Ans->|N
Goto E
Lbl C
If |N=2MedGray+1
Goto E
If sum(|N={DarkGray,25,2Magenta,2Navy,2MedGray+1
Then
Output(I,I%," "
I+(|N=2Navy)(I<Blue)-(|N=Gray+2)(I>1->I
I%+(|N=2Magenta)(I%<2Magenta)-(|N=DarkGray)(I%>1->I%
End
Lbl S
Output(I,I%,"X"
For(theta,int(~|E9rand),0
getKey->|N
If Ans
1->theta
End
Goto C
Lbl E
ClrHome
If not(|N
Goto S