diff --git a/src/Types/Interior.hs b/src/Types/Interior.hs index a008c95..f65f840 100644 --- a/src/Types/Interior.hs +++ b/src/Types/Interior.hs @@ -85,16 +85,18 @@ clusterMat ClusterFlipchart _ = , [ Just ImgEmpty] ] clusterMat ClusterConferenceTable (h, w) = - M.fromLists $ - [ replicate w (Just ImgEmpty) - , [ Just ImgEmpty, Just ImgTableC4] ++ replicate (w-4) (Just ImgTableNW) ++ + let mw = max 4 w + mh = max 4 h + in M.fromLists $ + [ replicate mw (Just ImgEmpty) + , [ Just ImgEmpty, Just ImgTableC4] ++ replicate (mw-4) (Just ImgTableNW) ++ [ Just ImgTableC3, Just ImgEmpty ] ] ++ - replicate (h-4) ([ Just ImgEmpty, Just ImgTableSW] ++ replicate (w-4) (Just ImgEmpty) ++ + replicate (mh-4) ([ Just ImgEmpty, Just ImgTableSW] ++ replicate (mw-4) (Just ImgEmpty) ++ [ Just ImgTableNE, Just ImgEmpty ]) ++ - [ [ Just ImgEmpty, Just ImgTableC1] ++ replicate (w-4) (Just ImgTableSE) ++ + [ [ Just ImgEmpty, Just ImgTableC1] ++ replicate (mw-4) (Just ImgTableSE) ++ [ Just ImgTableC2, Just ImgEmpty ] - , replicate w (Just ImgEmpty) + , replicate mw (Just ImgEmpty) ] clusterMat ClusterPlant1 _ = M.fromLists @@ -152,10 +154,13 @@ clusterPoints ClusterFlipchart _ = [ ReachPoint Table (V2 2 1) NW ] clusterPoints ClusterConferenceTable (h, w) = - [ ReachPoint Table (V2 1 c) SE | c <- [2..w-2] ] ++ - [ ReachPoint Table (V2 r 1) NE | r <- [2..h-2] ] ++ - [ ReachPoint Table (V2 r w) SW | r <- [2..h-2] ] ++ - [ ReachPoint Table (V2 h c) NW | c <- [2..w-2] ] + let mw = max 4 w + mh = max 4 h + in + [ ReachPoint Table (V2 1 c) SE | c <- [2..mw-1] ] ++ + [ ReachPoint Table (V2 r 1) NE | r <- [2..mh-1] ] ++ + [ ReachPoint Table (V2 r mw) SW | r <- [2..mh-1] ] ++ + [ ReachPoint Table (V2 mh c) NW | c <- [2..mw-1] ] clusterPoints ClusterToilet _ = [ ReachPoint Toilet (V2 1 1) NE ]