Skip to content

Instantly share code, notes, and snippets.

View aenakin's full-sized avatar
👀
Made you look!

Alex Heinonen aenakin

👀
Made you look!
View GitHub Profile
@aenakin
aenakin / RollRightRollLeft.swift
Created February 5, 2022 18:45
My take on the final level of Playgrounds Learn to Code 1 - Roll Right Roll Left.
func navAround() {
if !isBlocked {
while isOnGem || isOnClosedSwitch {
if isOnGem {
collectGem()
} else if isOnClosedSwitch {
toggleSwitch()
}
}
moveForward()