This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while isBlockedRight{ //while blocked on the right move forward. | |
moveForward() | |
if isOnClosedSwitch && !isBlocked{ //while moving forward, if lands on a closed switch and is NOT blocked.. | |
toggleSwitch() // flip the switch... | |
turnRight() //turn right... | |
moveForward() //move forward... | |
} | |
while isBlocked{ //until you're blocked from the front and... | |
turnLeft() | |
if isOnClosedSwitch{ |