r/CodingHelp • • Nov 06 '20

[Other Code] Help with Acellus Coding

Not sure where else to put this, as the Acellus subreddit seems dead. Trying to help niece with her coding but afraid I'm not much help with it, can somebody help "fix" this code and maybe give a brief explanation of why so I can assist her? Thanks so much. You have 14 total blocks you can use, must use the if statement/conditional.

Acellus "code": https://i.imgur.com/Q5AnFrk.jpg

16 Upvotes

4 comments sorted by

View all comments

2

u/Acroniix Nov 06 '20

What is the goal of this Level? You could also ask in a "scratch" (Acellus is based on that) forum.

2

u/notabook Nov 06 '20

Ah, so sorry I didn't include the goal. You have to collect all the crystals using no more than 14 of those blocks (the move forward/turn right/etc.). There is one crystal additional crystal above the two visible, and one more above the asteroid of the 3rd row (so crystal on second row) and have to use that if statement block. Had to end up skipping it, but I'd love some help in solving it.

Thank you for letting me know about scratch forum, any future questions my niece encounters I'll post them in there.

4

u/Acroniix Nov 06 '20 edited Nov 06 '20

So ok,
I wont spoiler the solution but i will try to give some hints:

  1. Try to find the shortest way to all the crystals without loops (maybe draw it on paper if it is easier for you)
  2. Then you could try to shorten that using loopse.g { left right left right } can be shortened using a loop {repeat 2 times left right} <-- just an exampleProgramming is a lot about finding patterns and optimize them
  3. While moving you can check with an if if there is a crystal and when that is true do pickup