tracer/src/Types/Interior.hs

32 lines
621 B
Haskell
Raw Normal View History

2018-03-03 16:03:17 +00:00
module Types.Interior where
import Data.Matrix as M
-- internal imports
import Types.Map
import Types.UserData
data Cluster
= ClusterBox1
deriving (Enum, Bounded)
clusterMat :: Cluster -> Matrix (Maybe ImgId)
clusterMat ClusterBox1 =
M.fromLists
2018-03-05 20:11:38 +00:00
-- [ [ Nothing]
[ [Just ImgMiscBox1]
-- , [Nothing, Nothing, Nothing]
2018-03-03 16:03:17 +00:00
]
clusterRoom :: Cluster -> TileState
clusterRoom ClusterBox1 = Offi
instance Size Cluster where
size c =
let mat = clusterMat c
in fromIntegral ((nrows mat) * (ncols mat))
-- class ClusterData c where
-- clusterMat :: c -> Matrix (Maybe ImgId)