@@ -59,7 +59,7 @@ mkLevel difficulty = do
59 start <- randomP
59 start <- randomP
60 end <- randomP
60 end <- randomP
61 -- first the base geography: all rocks
61 -- first the base geography: all rocks
62− let baseGeo = array ((0,0), (levelWidth, levelHeight))
62+ let baseGeo = array ((0,0), (levelWidth-1, levelHeight-1))
63 [((x,y),Rock) | x <- [0..levelWidth-1], y <- [0..levelHeight-1]]
63 [((x,y),Rock) | x <- [0..levelWidth-1], y <- [0..levelHeight-1]]
64 -- next the empty spaces that make the rooms
64 -- next the empty spaces that make the rooms
65 -- for this we generate a number of center points
65 -- for this we generate a number of center points