Test of lock and key system

This commit is contained in:
2021-11-22 23:54:58 +00:00
parent 05e1307336
commit 5ab5be3087
11 changed files with 84 additions and 20 deletions
+6 -1
View File
@@ -48,7 +48,12 @@ posRms bounds parenti@(pr,i) numChild (t@(Node (cr,i') _):ts) tseq = do
mayrs <- posRms (convexBounds ++ bounds)
(first upr parenti) (numChild + 1) ts (tseq |> shiftedt)
case mayrs of
Nothing -> putStr ("Backtracking to room " ++ show i' ++ ": ") >> tryLinks (j+1) ls
--Nothing -> putStr ("Backtracking to room " ++ show i' ++ ": ") >> tryLinks (j+1) ls
Nothing -> do
putStr $ "Backtracking to " ++ (rpns 20 (_rmName cr ++ "-" ++ show i'))
++ (rpns 9 (" child " ++ show numChild ))
++ (rpns 25 (" of " ++ _rmName pr ++ "-" ++ show i ))
tryLinks (j+1) ls
Just rs -> return (Just rs)
where
convexBounds = map pointsToPoly $ _rmBound r'