From 9e077cec161f42f7259bc6e1ae53a94965b422ec Mon Sep 17 00:00:00 2001 From: nek0 Date: Tue, 13 Nov 2018 00:56:18 +0100 Subject: [PATCH] this might have been the toilet bug --- src/Util.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Util.hs b/src/Util.hs index fce4a77..c2644d4 100644 --- a/src/Util.hs +++ b/src/Util.hs @@ -107,6 +107,20 @@ convertTileToImg mat = fromLists conversion Just ImgEmpty | otherwise -> Nothing + Kitc + | any + (\(rr, cc) -> M.safeGet (irow + rr) (icol + cc) mat == Just Door) + [(1, 0), (-1, 0), (0, 1), (0, -1)] -> + Just ImgEmpty + | otherwise -> + Nothing + Toil + | any + (\(rr, cc) -> M.safeGet (irow + rr) (icol + cc) mat == Just Door) + [(1, 0), (-1, 0), (0, 1), (0, -1)] -> + Just ImgEmpty + | otherwise -> + Nothing _ -> Nothing