summaryrefslogtreecommitdiffstats
path: root/src/model/Direction.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/Direction.coffee')
-rw-r--r--src/model/Direction.coffee13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/model/Direction.coffee b/src/model/Direction.coffee
new file mode 100644
index 0000000..5c49c80
--- /dev/null
+++ b/src/model/Direction.coffee
@@ -0,0 +1,13 @@
+'use strict'
+
+
+Direction =
+ NORTH: 0
+ EAST: 1
+ SOUTH: 2
+ WEST: 3
+
+ reverse: (d) -> (d+2)%4
+
+
+module.exports = Direction