aboutsummaryrefslogtreecommitdiff
path: root/src/Model/Position.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model/Position.elm')
-rw-r--r--src/Model/Position.elm12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Model/Position.elm b/src/Model/Position.elm
new file mode 100644
index 0000000..b73a3d9
--- /dev/null
+++ b/src/Model/Position.elm
@@ -0,0 +1,12 @@
+module Model.Position
+ ( positionEncoder
+ ) where
+
+import Json.Encode (..)
+
+positionEncoder : (Int, Int) -> Value
+positionEncoder (x, y) =
+ object
+ [ ("x", int x)
+ , ("y", int y)
+ ]