Correctly set obstacle when creating block
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
--{-# LANGUAGE TupleSections #-}
|
||||
module Dodge.Path
|
||||
( pointTowardsImpulse
|
||||
, makePathBetween
|
||||
@@ -118,7 +118,7 @@ toPathEdge sp' ep = PathEdge sp' ep mempty
|
||||
|
||||
insertEdges :: (Point2 -> Point2 -> b)
|
||||
-> Set (Point2,Point2) -> Gr Point2 b -> Map Point2 Int -> (Gr Point2 b,Map (V2 Point2) Int2)
|
||||
insertEdges efunc pairset gr nm = runIdentity $ S.fold_ insertedge (gr,mempty) id $ (S.each pairset)
|
||||
insertEdges efunc pairset gr nm = runIdentity $ S.fold_ insertedge (gr,mempty) id $ S.each pairset
|
||||
where
|
||||
insertedge (gr',em) (a,b) = (insEdge (f a,f b,efunc a b) gr'
|
||||
, M.insert (V2 a b) (V2 (f a) (f b)) em)
|
||||
|
||||
Reference in New Issue
Block a user