diff --git a/src/Test.hs b/src/Test.hs index 1aef5a0..3945f82 100644 --- a/src/Test.hs +++ b/src/Test.hs @@ -205,7 +205,7 @@ drawTile ai ctx pr pc row col img = dist = distance (V2 (fromIntegral row) (fromIntegral col)) (V2 (realToFrac pr - 1) (realToFrac pc)) / 4 fact = - if (pr <= fromIntegral row + maximum maxrs && + if (pr <= fromIntegral row + minimum maxrs && pc >= fromIntegral col + minimum mincs) && isWall (fromJust img) then min 1 dist