<p>@garfield I don’t think they will care so long as you transfer everything back into the original array because the method was not supposed to return anything and was only supposed to manipulate the array that was given as a field.</p>
<p>@youngster9 As I stated above, setDirectionToward(<em>Previous location</em>), then canMove() would work. Just remember to set it back to its original direction that you saved.</p>
<p>Hypothetically…or FRQ about climbing, did the code work for non-alphabetical and did not for alphabetical. Hypothetically…LOL</p>
<p>@hkchaos I did the same thing except i called the super act method. Only difference is that if it cannot move it will turn 45 degrees. Do you think they’ll take points of for that even if I set it to its previous direction afterwards.</p>
<p>@ panmit I got it the other way around</p>
<p>No, I don’t think so. As long as it’s set back to its original direction it shouldn’t matter. As long as it all happens in one call.</p>
<p>Same answer as aperso, it was doing it consecutively, so comparison with alphabetical methods would have been thrown off</p>
<p>@HxCKhaos
No read what I said. canMove checks the adjacent location in the direction you are facing. You would have to create a method or find a way to make sure the old location did not contain actors other than a flower on your own. And correct me if I’m wrong but setDirection(oldLoc) would make you face your old location, it would not make you face the way you previously were, you were supposed to set your direction to the old direction you were facing.</p>
<p>Right, thanks</p>
<p>Awww really, I thought I checked it properly… b/c</p>
<p>I got opposite of panmit…</p>
<p>Sent from my SAMSUNG-SGH-I927 using CC</p>
<p>@Arroza let me explain.</p>
<p>act()
Bug saves original location and direction.
Bug moves.</p>
<p>restore()
If the bug didn’t move, just set the direction to the original
else, set direction toward the original location. Check if canMove(). If can, move().
set direction to original direction.</p>
<p>It all happens in one call.</p>
<p>also, setDirection passes in an int. setDirectionToward passes in a loc.</p>
<p>@John</p>
<p>Exactly, the code wasn’t robust enough to compare non-alphabetical lists, so for that question no for non-alpha, yes for yes-alpha</p>
<p>MC was a complete ***** to trace through. You can only go through so many for-loops before getting irritated. </p>
<p>For the frq alphabetical sort, is it bad that I called substring on the first letter and compared that to the first letter of the other word with compareTo? I’ve never really used compareTo before on Strings, so I was just guessing. It won’t work with more than one word with the same letter, but it works at a very basic level.</p>
<p>Interesting.</p>
<p>Okay, can I describe my whole retrobug method here? is it allowed?</p>
<p>@clownjester10 as long as the entire string was compared, yes. so if you did something like, Str.substring(0, str.length()), that should work. If a word like Brian and Bryan were compared, using just the first letter would not work.</p>
<p>@ZeldaMaster123 I don’t think so, I would just use pseudocode.</p>
<p>@clownjester</p>
<p>No I’m pretty sure they wouldn’t take any points off for that</p>
<p>Haha that’s exactly what I was thinking of doing (looping through each char, comparing, then moving on to next index, repeat), but I decided just to guess and input the whole word. But damn, setting up loops for compareTo for each char would have taken a million lines haha</p>
<p>For the alphabetical order question the best method was the compareTo method for strings which will order them lexicographically which is alphabetical basically since we only have letters.</p>
<p>Why did the horse have weight?</p>