Tweak pathfinding

This commit is contained in:
2022-06-30 16:41:12 +01:00
parent 1abcf099e2
commit 3dfa6926cc
7 changed files with 44 additions and 18 deletions
+2
View File
@@ -30,6 +30,7 @@ import Geometry.ConvexPoly
--import Data.Foldable
import qualified Data.IntMap.Strict as IM -- Lazy?
import qualified Data.Map.Strict as M
import qualified Data.Set as Set
import Control.Lens
import Data.Maybe
import qualified Streaming.Prelude as S
@@ -266,6 +267,7 @@ drawWlIDs cfig w = setLayer FixedCoordLayer $ foldMap f (_walls w)
drawPathing :: World -> Picture
drawPathing w = setLayer DebugLayer $
(color green . pictures . map (thickLine 5 . tflat2) $ graphToEdges gr)
--(color green . pictures . Set.map (thickLine 5 . tflat2) $ _pathGraphP w)
<> concatMap dispInc (graphToIncidence gr)
where
dispInc (p,n) = setDepth 2 . uncurryV translate p . scale 0.1 0.1 $ text $ show n