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

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

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