Help please! a problem in java game for beginner

java game for beginner—the [blockly games] :maze level 10,
so hard to pass, what should i do when i in the cross, or in a road not single direction,
i can only use 10 blocks to solve the problem, but i don’ t know how to make it successful.
can you provide some points? thanks so much!!

you need to give more context about this challenge

You have to use repeat until <goal> so you can check every direction until it reaches the goal. The idea here is to follow the right-hand rule where you always try to go right first. If right path isn’t detected then check the straight path, so does checking also left. If every direction is blocked, command to turn around (in case of mine, I let my character turn left) and check again if right, ahead, left is visible and not blocked.

Structure of Loop for you to understand a bit (and cuz’ I suck in explaining):

  • Use repeat until block
  • Use if path /direction/ do … else …*
  • Check if its a right path: turn right, move forward
  • Check if its a straight path: move forward
  • Check if its a left path: turn left, move forward
  • Else if everything is blocked, turn around: turn left