Post

Replies

Boosts

Views

Activity

Reply to Roll right roll left swift playgrounds
Try func collectToggle() {     if isOnGem {         collectGem()     } else if isOnClosedSwitch {         toggleSwitch()     } } while !isOnOpenSwitch {     collectToggle()     if isBlocked && isBlockedLeft {         turnRight()     } else if isBlocked && isBlockedRight {         turnLeft()     } else if isOnOpenSwitch && isBlocked {         turnLeft()     }      moveForward() } it's less confusing in my opinion
Nov ’21