Add Layout trait
This commit is contained in:
parent
00eda50872
commit
295490858b
12 changed files with 407 additions and 41 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue