@map_width = 100@grid = {}def set_tile(x, y, value) @grid[y * @map_width + x] = valueend...def set_tile(50, 50, true)But because a tile is nothing but a coordinate (not a class) I can not use the typical recursive algorithm to flood fill tiles to true.
Code:
def flood_fill4(x, y) # erm... yeah... what to put here...end...flood_fill4(50, 50)