Implement basic laser sensor

This commit is contained in:
2021-11-01 18:20:45 +00:00
parent 0dcb1d2c07
commit 82de39657b
7 changed files with 59 additions and 21 deletions
+1 -1
View File
@@ -196,7 +196,7 @@ placeMachine color wallpoly mc p rot w = (mcid
where
mcid = IM.newKey $ _machines w
wlid = IM.newKey $ _walls w
wlids = IS.fromList [wlid .. wlid + length wallpoly]
wlids = IS.fromList [wlid .. wlid + length wallpoly - 1]
addMc mcs = IM.insert mcid (mc {_mcPos = p,_mcDir = rot,_mcID = mcid, _mcWallIDs = wlids}) mcs
-- TODO correctly remove/shift pathfinding lines (removePathsCrossing)
placeMachineWalls :: Color -> [Point2] -> Int -> Int -> IM.IntMap Wall -> IM.IntMap Wall