Skip to content

Commit

Permalink
Merge pull request #37 from pilksoc/backend
Browse files Browse the repository at this point in the history
Add query coordinate to LocalGrid
  • Loading branch information
ettolrach authored Mar 3, 2024
2 parents 514e948 + 4641a17 commit bef4b25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/src/local_grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ impl LocalGrid {
for space in grid.get_neighbours_n_away(coordinate, local_size) {
spaces.push(space.clone())
}
if let Some(current_space_ref) = grid.get_space(coordinate) {
spaces.push(current_space_ref.clone());
}
LocalGrid { spaces }
}
}

0 comments on commit bef4b25

Please sign in to comment.