Skip to content

Instantly share code, notes, and snippets.

@TheMuellenator
Last active July 2, 2024 09:03
Show Gist options
  • Save TheMuellenator/a15238bb2a2ec48298d21dd5c9748fae to your computer and use it in GitHub Desktop.
Save TheMuellenator/a15238bb2a2ec48298d21dd5c9748fae to your computer and use it in GitHub Desktop.
iOS repl.it - Functions 1 Challenge Solution
print("Starting map")
start()
//4 steps right and 5 steps down.
right()
right()
right()
right()
down()
down()
down()
down()
down()
//Don't change the code below this line.
print("Final map")
visualise();
@abrahammella
Copy link

func moveTheFox(){
  for moves in 1...5{
    if moves != 5{
      right()
    }
    down()
  }
}

moveTheFox()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment