Last active
July 2, 2024 09:03
-
-
Save TheMuellenator/a15238bb2a2ec48298d21dd5c9748fae to your computer and use it in GitHub Desktop.
iOS repl.it - Functions 1 Challenge Solution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
@ERaff83 Follow the instruction as ZiZasaurus's mention, it should work by adding compile = ["swiftc", "-o", "main", "main.swift", "game.swift"]
on the hidden .replit
config file.
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
HELP Please