robotopia icon indicating copy to clipboard operation
robotopia copied to clipboard

IsNextField Doesn't seem to work after rotation

Open vishvananda opened this issue 8 years ago • 2 comments

The following setup on http://robotopia.co/#tutorial/Conditions/1 causes the robot to get stuck in the top left corner:

when start
  repeat 50 times
  do
    if
      isNextField Water
    do
      Rotate Right
    else
      Move Forward

But the following seems to work:

when start
  repeat 50 times
  do
    if
      isNextField Water
    do
      Rotate Right
      Move Forward
    else
      Move Forward

It appears that isNextField Water is returning true after rotating right. I assume that it isn't taking the current orientation into account when checking the next field.

vishvananda avatar Apr 05 '17 21:04 vishvananda

Also the following works:

when start
  repeat 50 times
  do
    Move Forward
    if
      isNextField Water
    do
      Rotate Right

does isNextField -> Water only return true after trying to move into the water?

vishvananda avatar Apr 05 '17 21:04 vishvananda

@vishvananda Thank you for reporting this bug. That really is weird. We'll look into it as soon as possible!

timgrossmann avatar Apr 06 '17 17:04 timgrossmann