Skip to content

Commit

Permalink
Restyled by fourmolu
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed Sep 22, 2024
1 parent 3d3fe52 commit 94c85cd
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module Swarm.Game.Scenario.Topography.Structure.Assembly (
)
where

import Debug.Trace (trace)
import Control.Arrow (left, (&&&))
import Control.Monad (when)
import Data.Coerce
Expand All @@ -23,6 +22,7 @@ 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,12 +123,15 @@ 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
trace
( unwords
[ "Merging base grid at position"
, show $ gridPosition baseGrid
, "with overlay grid at position"
, show $ gridPosition positionedOverlay
]
)
result
where
result = baseGrid <> positionedOverlay

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ module Swarm.Game.Scenario.Topography.Structure.Overlay (
OverlayPair (..),
) where

import Debug.Trace (trace)
import Control.Applicative
import Data.Function (on)
import Data.Int (Int32)
import Data.Tuple (swap)
import Debug.Trace (trace)
import Linear hiding (trace)
import Swarm.Game.Location
import Swarm.Game.Scenario.Topography.Area
Expand Down
8 changes: 4 additions & 4 deletions test/unit/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ main :: IO ()
main = do
defaultMain statelessTests

-- ms <- runExceptT classicGame0
-- case ms of
-- Left err -> assertFailure (from err)
-- Right s -> defaultMain (stateDependentTests s)
-- ms <- runExceptT classicGame0
-- case ms of
-- Left err -> assertFailure (from err)
-- Right s -> defaultMain (stateDependentTests s)

-- | Initializing an 'AppState' entails
-- loading challenge scenarios, etc. from
Expand Down
26 changes: 12 additions & 14 deletions test/unit/TestOverlay.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,29 +98,27 @@ testOverlay =
]
, testGroup
"Northwesterly offset of first sibling"
[

-- testMergedSize
[ -- testMergedSize
-- "test merged size"
-- (placeUnshifted "baseLayer" (Location 0 0) [[]])
-- (placeUnshifted "sibling1" (Location (-1) 1) oneByOneGrid)
-- (AreaDimensions 1 1)

-- , testMergedSize
-- "test merged size"
-- (place (Location 1 (-1)) "sibling1" (Location (-1) 1) oneByOneGrid)
-- (placeUnshifted "sibling2" (Location 0 0) twoByTwoGrid)
-- (AreaDimensions 3 3)
-- ,

mkOverlaySequenceOriginTest
"positive first south of second"
[ placeUnshifted "sibling1" (Location (-1) 1) oneByOneGrid
, placeUnshifted "sibling2" (Location 0 0) twoByTwoGrid
-- [ placeUnshifted "sibling2" (Location 0 0) twoByTwoGrid
-- , placeUnshifted "sibling1" (Location (-1) 1) oneByOneGrid
]
(Location 1 (-1))
-- ,

mkOverlaySequenceOriginTest
"positive first south of second"
[ placeUnshifted "sibling1" (Location (-1) 1) oneByOneGrid
, placeUnshifted "sibling2" (Location 0 0) twoByTwoGrid
-- [ placeUnshifted "sibling2" (Location 0 0) twoByTwoGrid
-- , placeUnshifted "sibling1" (Location (-1) 1) oneByOneGrid
]
(Location 1 (-1))
]
]
]
Expand Down

0 comments on commit 94c85cd

Please sign in to comment.