Add Layout trait

This commit is contained in:
hal8174 2025-01-30 23:22:37 +01:00
parent 00eda50872
commit 295490858b
12 changed files with 407 additions and 41 deletions

View file

@ -12,14 +12,14 @@ pub struct HashMapMap {
}
impl HashMapMap {
fn new(size: impl Into<Position>) -> Self {
pub fn new(size: impl Into<Position>) -> Self {
Self {
map: HashSet::new(),
size: size.into(),
}
}
fn set_blocked_range(
pub fn set_blocked_range(
&mut self,
min_pos: impl Into<Position>,
max_pos: impl Into<Position>,
@ -35,7 +35,7 @@ impl HashMapMap {
}
}
fn set_blocked(&mut self, pos: impl Into<Position>, block: bool) {
pub fn set_blocked(&mut self, pos: impl Into<Position>, block: bool) {
let pos = pos.into();
if block {
self.map.insert(pos);