use crate::{usage_types::coordinates::Coordinate, VectorGrid};
impl<ItemType> VectorGrid<ItemType> {
pub fn set_item(&mut self, at: Coordinate, to: ItemType) {
self[&at] = to
}
pub fn set_item_if_contained(&mut self, at: Coordinate, to: ItemType) {
if self.is_inside_grid(&at) {
self[&at] = to
}
}
}