0 Members and 1 Guest are viewing this topic.
prgmTEST.TEST20->X->YRepeat getkey(15)If getkey(1)Y+1->YEndIf getkey(2)X-1->XEndIf getkey(3)X+1->XEndIf getkey(4)Y-1->YEndClrDrawPt-On(X,Y,[FFFFFFFFFFFFFFFF]DispgraphEnd
prgmTEST.TEST20->X->YRepeat getkey(15)getkey(1)?Y++getkey(2)?X--getkey(3)?X++getkey(4)?Y--ClrDrawPt-On(X,Y,[FFFFFFFFFFFFFFFFDispgraphEnd
prgmTEST.TEST20->X->YWhile 1getkey(1)?Y++getkey(2)?X--getkey(3)?X++getkey(4)?Y--ClrDrawPt-On(X,Y,[FFFFFFFFFFFFFFFFDispgraphEnd!If getKey(15)
Here's a small optimization (355 bytes):prgmTEST.TEST20->X->YWhile 1getkey(1)?Y++getkey(2)?X--getkey(3)?X++getkey(4)?Y--ClrDrawPt-On(X,Y,[FFFFFFFFFFFFFFFFDispgraphEnd!If getKey(15)
prgmTEST.TEST2and 0->X->YWhile 1getkey(1)?Yr++getkey(2)?Xr--getkey(3)?Xr++getkey(4)?Yr--ClrDrawPt-On(X,Y,[FFFFFFFFFFFFFFFF])DispgraphEndIf getKey(15)
what is that and and r for?
Data(0ʳ)→°XPosData(0ʳ)→°YPosWhile 1 DispGraphClrDraw Pt-On(getKey(3)-getKey(2)+XPos→XPos,getKey(1)-getKey(4)+YPos→YPos,[FFFFFFFFFFFFFFFF])EndIf getKey(15)Return
Data(⁻1ʳ)→°XPosData(⁻1ʳ)→°YPosClrHomeWhile 1 If getKey(3)-getKey(2)+XPos→XPos+9^ᴇ100<105 If getKey(1)-getKey(4)+YPos→YPos+9^ᴇ100<73 Bitmap(XPos,YPos,[0A0A00007F807F807F807F807F807F807F807F800000]) FnOff .Sneaky optimized way to disable the run indicator End EndEndIf getKey(15)Return
Data(1ʳ)→°XPosData(1ʳ)→°YPosClrHomeWhile 1 Bitmap(min(getKey(3)-getKey(2)+XPos(Bump()),89)→XPos-2,min(getKey(1)-getKey(4)+YPos(Bump()),57)→YPos-2,[0A0A00007F807F807F807F807F807F807F807F800000]) FnOff .Sneaky optimized way to disable the run indicatorEndIf getKey(15)Lbl BumpReturnIf Return +1
.CLIPPER40→X→Y48→S32→TRepeat getKey(15)X+getKey(3)-(getKey(2))→X→NY+getKey(1)-(getKey(4))→Y→OIf N>>9595→N(95-S)//(N-S)*(O-T)→OO+T→OEndIf O>>6363→O63-T//(O-T)*(N-S)→NN+48→NEndIf N<<0-1→N~S//(N-S)*(O-T)+T→O.the squiggly ~ is the negative signEndIf O<<0-1→O~T//(O-T)*(N-S)+S→NEndLine(S,T,N,O)DispGraphClrDrawPause 20End
* Runer112 has arrived on the scene!<snip Insanity>
Quote from: Runer112 on October 13, 2011, 09:44:10 pm* Runer112 has arrived on the scene!<snip Insanity>This is how the rest of the optimization competitions will generally go
Before I saw that he'd already arrived, I was gonna ask if there was a rule that Runer112 can't compete or something lol