Created
June 12, 2020 12:02
-
-
Save ProgDan/e3b2f1c95b8c26cd73f180a251a57e93 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| def go_up(): | |
| if head.direction != "down": | |
| head.direction = "up" | |
| def go_down(): | |
| if head.direction != "up": | |
| head.direction = "down" | |
| def go_right(): | |
| if head.direction != "left": | |
| head.direction = "right" | |
| def go_left(): | |
| if head.direction != "right": | |
| head.direction = "left" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment