still not finding toilet bug
This commit is contained in:
parent
c4c7541b71
commit
d79d9b1ed9
4 changed files with 13 additions and 6 deletions
|
@ -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") $
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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 _ = []
|
||||||
|
|
Loading…
Reference in a new issue