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

import Json.Encode exposing (..)

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