Created
February 17, 2017 17:37
-
-
Save zakaluka/f62081b26f5d9d6f415cc247460d22d9 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
let turn way loc = | |
match way with | |
| L -> | |
match loc.dir with | |
| North -> { loc with dir = West } | |
| West -> { loc with dir = South } | |
| South -> { loc with dir = East } | |
| East -> { loc with dir = North } | |
| R -> | |
match loc.dir with | |
| North -> { loc with dir = East } | |
| East -> { loc with dir = South } | |
| South -> { loc with dir = West } | |
| West -> { loc with dir = North } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment