overmapper.rb
def draw_loop(overview, &blk)
  iy = 0
  overview.s.upto(overview.n).each do |y|
    ix = 0
    overview.w.upto(overview.e).each do |x|
      blk.call(x, y, ix, iy)
      ix += 1
    end
    iy += 1
  end
end
# Drawing loop helper
#
# As wee need to convert a number of coordinates it seems better to extract
# the loop logic.
#
# x, y - overmap coordinates
# ix, iy - image coordinates
Drawing loop helper
As wee need to convert a number of coordinates it seems better to extract
the loop logic.

x, y - overmap coordinates
ix, iy - image coordinates
Drawing loop helper As wee need to convert a number of coordinates it seems better to extract the loop logic . x y - overmap coordinates ix iy - image coordinates
def draw_loop(overview, &blk)
  iy = 0
  overview.s.upto(overview.n).each do |y|
    ix = 0
    overview.w.upto(overview.e).each do |x|
      blk.call(x, y, ix, iy)
      ix += 1
    end
    iy += 1
  end
end
def draw_loop ( overview , & blk ) iy = 0 overview . s . upto ( overview . n ) . each do | y | ix = 0 overview . w . upto ( overview . e ) . each do | x | blk . call ( x , y , ix , iy ) ix += 1 end iy += 1 end end
Drawing loop helper
As wee need to convert a number of coordinates it seems better to extract
the loop logic.
Drawing loop helper As wee need to convert a number of coordinates it seems better to extract the loop logic .
overview
blk