my code is
func nevigateAroundWall() {
if isBlocked && isBlockedRight{
turnLeft()
}else if isBlocked {
turnRight()
}else{
moveForward()
}
}
while !isOnOpenSwitch OR !isBlockedLeft OR isBlocked {
nevigateAroundWall()
if isOnClosedSwitch {
toogle Switch()
}else if isOnGem{
collectGem()
}
}