Skip to content

Commit

Permalink
remove debug trace
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo committed Sep 23, 2024
1 parent f177ee3 commit 57ae30e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import Data.Map qualified as M
import Data.Set qualified as Set
import Data.Text (Text)
import Data.Text qualified as T
import Debug.Trace (trace)
import Linear.Affine
import Swarm.Game.Location
import Swarm.Game.Scenario.Topography.Area
Expand Down Expand Up @@ -123,18 +122,8 @@ overlayGridExpanded
-- The 'childAdjustedOrigin' is the sum of origin adjustments
-- to completely assemble some substructure.
(PositionedGrid childAdjustedOrigin overlayArea) =
trace
( unwords
[ "Merging base grid at position"
, show $ gridPosition baseGrid
, "with overlay grid at position"
, show $ gridPosition positionedOverlay
]
)
result
baseGrid <> positionedOverlay
where
result = baseGrid <> positionedOverlay

reorientedOverlayCells = applyOrientationTransform orientation overlayArea
placementAdjustedByOrigin = yamlPlacementOffset .+^ asVector childAdjustedOrigin
positionedOverlay = PositionedGrid placementAdjustedByOrigin reorientedOverlayCells
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ import Control.Applicative
import Data.Function (on)
import Data.Int (Int32)
import Data.Tuple (swap)
import Debug.Trace (trace)
import Linear hiding (trace)
import Linear (V2 (..))
import Swarm.Game.Location
import Swarm.Game.Scenario.Topography.Area
import Swarm.Game.Scenario.Topography.Grid
Expand Down Expand Up @@ -118,19 +117,7 @@ instance (Alternative f) => Semigroup (PositionedGrid (f a)) where
a1@(PositionedGrid baseLoc baseGrid) <> a2@(PositionedGrid overlayLoc overlayGrid) =
PositionedGrid newUpperLeftCornerPosition combinedGrid
where
mergedSize2 = computeMergedArea $ OverlayPair a1 a2
mergedSize =
trace
( unwords
[ "Merged size for "
, show a1
, "and"
, show a2
, ":"
, show mergedSize2
]
)
mergedSize2
mergedSize = computeMergedArea $ OverlayPair a1 a2
combinedGrid = zipGridRows mergedSize paddedOverlayPair

-- We create a vector from the overlay position,
Expand Down

0 comments on commit 57ae30e

Please sign in to comment.