lib/crossyglot/puzzle.rb
def each_cell
      cells.each_with_index do |c, idx|
        yield c, *(width ? idx.divmod(width).reverse : nil)
      end
    end
# Yields each cell along with x and y coord in grid (zero indexed)
Yields each cell along with x and y coord in grid (zero indexed)
Yields each cell along with x and y coord in grid ( zero indexed )
def each_cell
      cells.each_with_index do |c, idx|
        yield c, *(width ? idx.divmod(width).reverse : nil)
      end
    end
def each_cell cells . each_with_index do | c , idx | yield c , * ( width ? idx . divmod ( width ) . reverse : nil ) end end
Yields each cell along with x and y coord in grid (zero indexed)
Yields each cell along with x and y coord in grid ( zero indexed )