New town layouts, initial progress

This commit is contained in:
Joshua Barretto
2021-02-17 01:47:16 +00:00
parent 660b297dd0
commit 7d94c3600f
10 changed files with 448 additions and 273 deletions

View File

@ -32,6 +32,15 @@ impl<T> FromIterator<T> for Path<T> {
}
}
impl<T> IntoIterator for Path<T> {
type Item = T;
type IntoIter = std::vec::IntoIter<T>;
fn into_iter(self) -> Self::IntoIter {
self.nodes.into_iter()
}
}
impl<T> Path<T> {
pub fn is_empty(&self) -> bool { self.nodes.is_empty() }