summaryrefslogtreecommitdiffstats
path: root/src/structure.rs
blob: 21377664e85d23508bedf9f34b64f368f7a4a56e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use std::collections::HashMap;

pub use building::Building;

use crate::{physics::Point, Collision, Render};

mod building;

pub struct Structure {
    render_map: HashMap<Point, char>,
    collision_map: Vec<Point>,
}

impl Render for Structure {
    fn render_map(&self) -> &HashMap<Point, char> {
        &self.render_map
    }
}

impl Collision for Structure {
    fn collision_map(&self) -> &Vec<crate::physics::Point> {
        &self.collision_map
    }
}