Skip to content

Commit

Permalink
Remove char arg
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo committed Dec 12, 2023
1 parent bc49876 commit 3d0fc2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/Swarm/Game/Display.hs
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ hidden = (defaultChar .~ '?') . (curOrientation .~ Nothing)

-- | The default way to display some terrain using the given character
-- and attribute, with priority 0.
defaultTerrainDisplay :: Char -> Attribute -> Display
defaultTerrainDisplay c attr =
defaultEntityDisplay c
defaultTerrainDisplay :: Attribute -> Display
defaultTerrainDisplay attr =
defaultEntityDisplay ' '
& displayPriority .~ 0
& displayAttr .~ attr

Expand Down
10 changes: 5 additions & 5 deletions src/Swarm/Game/Terrain.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ getTerrainWord = T.toLower . T.pack . init . show
terrainMap :: Map TerrainType Display
terrainMap =
M.fromList
[ (StoneT, defaultTerrainDisplay ' ' (ATerrain "stone"))
, (DirtT, defaultTerrainDisplay ' ' (ATerrain "dirt"))
, (GrassT, defaultTerrainDisplay ' ' (ATerrain "grass"))
, (IceT, defaultTerrainDisplay ' ' (ATerrain "ice"))
, (BlankT, defaultTerrainDisplay ' ' ADefault)
[ (StoneT, defaultTerrainDisplay (ATerrain "stone"))
, (DirtT, defaultTerrainDisplay (ATerrain "dirt"))
, (GrassT, defaultTerrainDisplay (ATerrain "grass"))
, (IceT, defaultTerrainDisplay (ATerrain "ice"))
, (BlankT, defaultTerrainDisplay ADefault)
]

0 comments on commit 3d0fc2d

Please sign in to comment.