Skip to content

Instantly share code, notes, and snippets.

@jeffnv
Created September 27, 2013 04:08
Show Gist options
  • Save jeffnv/6723980 to your computer and use it in GitHub Desktop.
Save jeffnv/6723980 to your computer and use it in GitHub Desktop.
def do_for_every_square(&prc)
@board.each_with_index do |row, row_index|
row.each_with_index do |square, col_index|
prc.call(row_index, col_index, square)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment