Skip to content

Instantly share code, notes, and snippets.

View KolemanIreland's full-sized avatar

KolemanIreland

View GitHub Profile
@KolemanIreland
KolemanIreland / gist:5ebd9a8e5b1fecfc5f736d68d584904d
Created December 13, 2018 06:00
Which Way to Turn Swift Playgrounds Learn to Code 1
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{