remove debug output
This commit is contained in:
parent
ba6cc36f9b
commit
d02c6e0a2b
2 changed files with 0 additions and 10 deletions
|
@ -21,9 +21,7 @@ buildHallFloorIO fc = do
|
||||||
withOW = buildOuterWalls withIW
|
withOW = buildOuterWalls withIW
|
||||||
closed = closeOffices withOW
|
closed = closeOffices withOW
|
||||||
doorgraph = buildDoorsGraph closed
|
doorgraph = buildDoorsGraph closed
|
||||||
traceIO "built graph"
|
|
||||||
doors <- buildDoors closed doorgraph
|
doors <- buildDoors closed doorgraph
|
||||||
traceIO "built doors"
|
|
||||||
let (_, facils) = buildFacilities g2 fc doors
|
let (_, facils) = buildFacilities g2 fc doors
|
||||||
return facils
|
return facils
|
||||||
|
|
||||||
|
@ -344,7 +342,6 @@ buildDoorsGraph mat =
|
||||||
|
|
||||||
buildDoors :: Matrix TileState -> [Graph] -> IO (Matrix TileState)
|
buildDoors :: Matrix TileState -> [Graph] -> IO (Matrix TileState)
|
||||||
buildDoors input graph = do
|
buildDoors input graph = do
|
||||||
traceIO ("graph: " ++ show (tail graph))
|
|
||||||
foldM placeDoors input graph
|
foldM placeDoors input graph
|
||||||
where
|
where
|
||||||
placeDoors :: Matrix TileState -> Graph -> IO (Matrix TileState)
|
placeDoors :: Matrix TileState -> Graph -> IO (Matrix TileState)
|
||||||
|
@ -353,7 +350,6 @@ buildDoors input graph = do
|
||||||
placeDoors amat (GRoom neighs bs) =
|
placeDoors amat (GRoom neighs bs) =
|
||||||
if Hall `elem` map snd neighs
|
if Hall `elem` map snd neighs
|
||||||
then do
|
then do
|
||||||
traceIO "door in Hall"
|
|
||||||
let halls = filter ((== Hall) . snd) neighs
|
let halls = filter ((== Hall) . snd) neighs
|
||||||
idx <- randomRIO (0, length halls - 1)
|
idx <- randomRIO (0, length halls - 1)
|
||||||
let (dir, _) = halls !! idx
|
let (dir, _) = halls !! idx
|
||||||
|
@ -379,7 +375,6 @@ buildDoors input graph = do
|
||||||
(fst (matmin bs), fst (matmax bs))
|
(fst (matmin bs), fst (matmax bs))
|
||||||
(snd (matmax bs) + 1)
|
(snd (matmax bs) + 1)
|
||||||
else do
|
else do
|
||||||
traceIO "door in Office"
|
|
||||||
idx <- randomRIO (0, length neighs - 1)
|
idx <- randomRIO (0, length neighs - 1)
|
||||||
let (dir, _) = neighs !! idx
|
let (dir, _) = neighs !! idx
|
||||||
case dir of
|
case dir of
|
||||||
|
@ -416,7 +411,6 @@ buildDoors input graph = do
|
||||||
if Door `elem` M.toList (M.submatrix row row (fst cols) (snd cols) mat)
|
if Door `elem` M.toList (M.submatrix row row (fst cols) (snd cols) mat)
|
||||||
then return mat
|
then return mat
|
||||||
else do
|
else do
|
||||||
traceIO ("placing door: " ++ show (row, col))
|
|
||||||
return $ M.setElem Door (row, col) mat
|
return $ M.setElem Door (row, col) mat
|
||||||
else
|
else
|
||||||
inRow mat row cols
|
inRow mat row cols
|
||||||
|
@ -433,7 +427,6 @@ buildDoors input graph = do
|
||||||
if Door `elem` M.toList (M.submatrix (fst rows) (snd rows) col col mat)
|
if Door `elem` M.toList (M.submatrix (fst rows) (snd rows) col col mat)
|
||||||
then return mat
|
then return mat
|
||||||
else do
|
else do
|
||||||
traceIO ("placing door: " ++ show (row, col))
|
|
||||||
return $ M.setElem Door (row, col) mat
|
return $ M.setElem Door (row, col) mat
|
||||||
else
|
else
|
||||||
inCol mat rows col
|
inCol mat rows col
|
||||||
|
|
|
@ -40,9 +40,6 @@ load = do
|
||||||
<$> (Window <$> newTVarIO [])
|
<$> (Window <$> newTVarIO [])
|
||||||
<*> (Mouse <$> newTVarIO [])
|
<*> (Mouse <$> newTVarIO [])
|
||||||
(ws, w) <- yieldSystemT (0, defWorld) (getWorld)
|
(ws, w) <- yieldSystemT (0, defWorld) (getWorld)
|
||||||
let fc = FloorConfig (20, 45) [(5, 5), (30,80)] (40, 90)
|
|
||||||
floor <- buildHallFloorIO fc
|
|
||||||
traceIO $ show floor
|
|
||||||
return UserData
|
return UserData
|
||||||
{ state = Menu
|
{ state = Menu
|
||||||
, subsystems = subs
|
, subsystems = subs
|
||||||
|
|
Loading…
Reference in a new issue