still not finding toilet bug

This commit is contained in:
nek0 2018-10-15 00:26:12 +02:00
parent c4c7541b71
commit d79d9b1ed9
4 changed files with 13 additions and 6 deletions

View file

@ -124,6 +124,13 @@ placeInteriorIO imat imgmat irp graph =
))
then A.log A.Debug ("no cluster placed") $
placeCluster g2 bnds (try + 1) mat rp appl
else if
any (`elem` (oldreaches))
(V2
<$> [pr .. pr + nrows cmat - 1]
<*> [pc .. pc + ncols cmat - 1])
then A.log A.Debug ("no cluster placed") $
placeCluster g2 bnds (try + 1) mat rp appl
else if
not (isReachable newmat [] (oldreaches ++ reaches) exits)
then A.log A.Debug ("no cluster placed") $

View file

@ -3,7 +3,7 @@ module Navigation where
import Affection as A
import Data.Matrix as M
import Data.Maybe (isJust)
import Data.Maybe (isJust, catMaybes)
-- internal imports

View file

@ -97,5 +97,5 @@ instance Collidible ImgId where
[ Boundaries (14/36, 14/36) (22/36, 22/36)
]
collisionObstacle ImgEmptyNoWalk =
[ Boundaries (0, 0) (1, 1) ]
[ Boundaries (0, 0) (0.99, 0.99) ]
collisionObstacle _ = []

View file

@ -193,7 +193,7 @@ naviGraph imgmat animBounds (V2 r c) =
(\(V2 br bc, _) -> floor br == r + oor && floor bc == c + ooc)
animBounds))
[(0, cc), (rr, 0)])
then V2 (r + rr) (c + cc): acc
then V2 (r + rr) (c + cc) : acc
else acc
)
[]