From 949b1ef22e98b043909aac4ef876d4dde0443293 Mon Sep 17 00:00:00 2001 From: ettolrach Date: Sun, 3 Mar 2024 10:38:56 +0000 Subject: [PATCH] Add query coordinate to LocalGrid --- backend/src/local_grid.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/local_grid.rs b/backend/src/local_grid.rs index c986e25..e1fe2c4 100644 --- a/backend/src/local_grid.rs +++ b/backend/src/local_grid.rs @@ -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 } } }