summaryrefslogtreecommitdiff
blob: e3011777b6b1bf9d1303b775a6128763bcba2b86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Battlemap.Direction exposing (Direction(..), opposite_of)

type Direction =
   None
   | Left
   | Right
   | Up
   | Down

opposite_of : Direction -> Direction
opposite_of d =
   case d of
      Left -> Right
      Right -> Left
      Up -> Down
      Down -> Up
      None -> None