License | BSD-3-Clause |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Swarm.Game.Scenario.Topography.Structure.Overlay
Contents
Description
Generic overlay operations on grids
Synopsis
- data PositionedGrid a = PositionedGrid {
- gridPosition :: Location
- gridContent :: Grid a
- computeMergedArea :: OverlayPair (PositionedGrid a) -> AreaDimensions
- data OverlayPair a = OverlayPair {}
Documentation
data PositionedGrid a Source #
Constructors
PositionedGrid | |
Fields
|
Instances
Alternative f => Semigroup (PositionedGrid (f a)) Source # | First arg: base layer Second arg: overlay layer The upper-left corner of the base layer is the original "origin". If the overlay is to the west or north of the base layer, then we must pad the base layer on the left or top. And since the area expands relative to the "origin" of the base layer, we must shift the combined grid's "origin" location to the new position of the base layer's upper-left corner. If the overlay is to the east/south, we do not have to modify the origin, since no padding is added to the left/top of the base layer. |
Defined in Swarm.Game.Scenario.Topography.Structure.Overlay Methods (<>) :: PositionedGrid (f a) -> PositionedGrid (f a) -> PositionedGrid (f a) # sconcat :: NonEmpty (PositionedGrid (f a)) -> PositionedGrid (f a) # stimes :: Integral b => b -> PositionedGrid (f a) -> PositionedGrid (f a) # | |
Show (PositionedGrid a) Source # | |
Defined in Swarm.Game.Scenario.Topography.Structure.Overlay Methods showsPrec :: Int -> PositionedGrid a -> ShowS # show :: PositionedGrid a -> String # showList :: [PositionedGrid a] -> ShowS # | |
Eq a => Eq (PositionedGrid a) Source # | |
Defined in Swarm.Game.Scenario.Topography.Structure.Overlay Methods (==) :: PositionedGrid a -> PositionedGrid a -> Bool # (/=) :: PositionedGrid a -> PositionedGrid a -> Bool # | |
HasLocation (PositionedGrid a) Source # | |
Defined in Swarm.Game.Scenario.Topography.Structure.Overlay Methods modifyLoc :: (Location -> Location) -> PositionedGrid a -> PositionedGrid a Source # offsetLoc :: V2 Int32 -> PositionedGrid a -> PositionedGrid a Source # |
Exported for unit tests
data OverlayPair a Source #
Constructors
OverlayPair | |