wip 5 transporters work right
This commit is contained in:
@@ -488,6 +488,15 @@ impl Board {
|
||||
pub fn is_object<P: Into<Point>>(&self, p: P) -> bool {
|
||||
matches!(self.get(p), Some(Tile::Object(_)))
|
||||
}
|
||||
|
||||
/// Return if there's an object at the given point and if it's mobile
|
||||
pub fn is_mobile<P: Into<Point>>(&self, p: P) -> bool {
|
||||
if let Some(Tile::Object(o)) = self.get(p) {
|
||||
o.mobile
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user