@@ -27,8 +27,8 @@ data Level = Level
2727 { levelStart :: (Int, Int)
2828 , levelEnd :: (Int, Int)
2929 , levelGeo :: Geo
30− -- building the geo image is expensive. Cache it. Though VTY should go through greater lengths
31− -- to avoid the need to cache images.
30+ -- building the geo image is expensive. Cache it. Though VTY should go
31+ -- through greater lengths to avoid the need to cache images.
3232 , levelGeoImage :: Image
3333 }
3434 deriving (Show,Eq)
@@ -111,7 +111,8 @@ movePlayer dx dy = do
111111 let Player x y = player world
112112 let x' = x + dx
113113 y' = y + dy
114− -- this is only valid because the level generation assures the border is always Rock
114+ -- this is only valid because the level generation assures the border is
115+ -- always Rock
115116 case levelGeo (level world) ! (x',y') of
116117 EmptySpace -> put $ world { player = Player x' y' }
117118 _ -> return ()
@@ -124,7 +125,8 @@ updateDisplay = do
124125 thePlayer <- gets player
125126 let ox = (w `div` 2) - playerX thePlayer
126127 oy = (h `div` 2) - playerY thePlayer
127− -- translate the world images to place the player in the center of the level.
128+ -- translate the world images to place the player in the center of the
129+ -- level.
128130 world' <- map (translate ox oy) <$> worldImages
129131 let pic = picForLayers $ info : world'
130132 vty <- ask
@@ -140,8 +142,8 @@ worldImages = do
140142buildGeoImage :: Geo -> Image
141143buildGeoImage geo =
142144 let (geoWidth, geoHeight) = snd $ bounds geo
143− -- seems like a the repeated index operation should be removable. This is not performing random
144− -- access but (presumably) access in order of index.
145+ -- seems like a the repeated index operation should be removable. This is
146+ -- not performing random access but (presumably) access in order of index.
145147 in vertCat [ geoRow
146148 | y <- [0..geoHeight-1]
147149 , let geoRow = horizCat [ i