def foreach
      for j in @min_vis_y..@max_vis_y
        for i in @min_vis_x..@max_vis_x
          pos = get_screen_pos i, j
          yield i, j, pos.x, pos.y
        end
      end
    end
def foreach
      for j in @min_vis_y..@max_vis_y
        for i in @min_vis_x..@max_vis_x
          pos = get_screen_pos i, j
          yield i, j, pos.x, pos.y
        end
      end
    end
Iterates through the currently visible tiles, providing the horizontal
 tile index, the vertical tile index, the x-coordinate (in pixels) and
 the y-coordinate (in pixels), of each tile, in that order, to a given
 block of code.

 Example:

   map.foreach do |i, j, x, y|
     draw_tile tiles[i][j], x, y
   end