Created
April 15, 2022 16:08
-
-
Save artemohanjanyan/6a97e6d22c420906d50bb0c83d9ee174 to your computer and use it in GitHub Desktop.
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
maze :: Integer -> Integer -> Integer | |
maze x y | |
| abs x > 10 || abs y > 10 = 0 | |
| x == 0 && y == 0 = 2 | |
| abs x == 9 && abs y == 9 = 1 | |
| abs x == 10 || abs y == 10 = 1 | |
| x == y = 3 | |
| abs x == abs y = 4 | |
| x < 0 && x > (-9) && y == 0 = 4 | |
| x > 0 && x < 9 && y == 0 = 3 | |
| otherwise = 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment