[][src]Function minutiae::util::iter_visible

pub fn iter_visible(
    cur_x: usize,
    cur_y: usize,
    view_distance: usize,
    universe_size: usize
) -> impl Iterator<Item = (usize, usize)>

Given current X and Y coordinates of an entity and the view distance of the universe, creates an iterator visiting the indexes of all visible grid coordinates. Note that this will include the index of the source entity.