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") $ then A.log A.Debug ("no cluster placed") $
placeCluster g2 bnds (try + 1) mat rp appl 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 else if
not (isReachable newmat [] (oldreaches ++ reaches) exits) not (isReachable newmat [] (oldreaches ++ reaches) exits)
then A.log A.Debug ("no cluster placed") $ then A.log A.Debug ("no cluster placed") $

View file

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

View file

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