tracer/src/Types/Map.hs

49 lines
825 B
Haskell
Raw Normal View History

module Types.Map where
data TileState
= Wall
-- | Wind
| Door
| Hall
| Offi
| Toil
| Kitc
| Elev
| Unde
deriving (Eq)
instance Show TileState where
show Wall = "#"
-- show Wind = "~"
show Door = "+"
show Hall = "_"
show Offi = "."
show Toil = "o"
show Kitc = "k"
show Elev = "x"
show Unde = " "
data FloorConfig = FloorConfig
{ elevator :: (Int, Int)
, facilities :: [(Int, Int)]
, size :: (Int, Int)
} deriving (Show)
data Boundaries = Boundaries
{ matmin :: (Int, Int)
, matmax :: (Int, Int)
} deriving (Show, Eq)
data GraphDirection = North | South | East | West
deriving (Show, Eq)
data Graph
= GHall
{ connects :: [Graph]
}
| GRoom
{ neighbs :: [(GraphDirection, TileState)]
, bounds :: Boundaries
}
deriving (Show, Eq)