aboutsummaryrefslogtreecommitdiff
path: root/src/Model/Position.elm
blob: b73a3d98d360573aca53bab1c571e37b85f27111 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module Model.Position
  ( positionEncoder
  ) where

import Json.Encode (..)

positionEncoder : (Int, Int) -> Value
positionEncoder (x, y) =
  object
    [ ("x", int x)
    , ("y", int y)
    ]