lib/smappy/static_map.rb in smappy-0.0.1 vs lib/smappy/static_map.rb in smappy-0.0.2
- old
+ new
@@ -45,11 +45,11 @@
end
end
def tiles
# How many tiles do we need to fill the image:
- tile_width = (width / Tile::SIZE).to_i + 1
- tile_height = (height / Tile::SIZE).to_i + 1
+ tile_width = (width / Tile::SIZE).to_i + 2
+ tile_height = (height / Tile::SIZE).to_i + 2
# What are our first and last tiles:
tile_x_start = (center_tile.x - (tile_width / 2)).to_i
tile_x_end = tile_x_start + tile_width
tile_y_start = (center_tile.y - (tile_height / 2)).to_i