1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use crate::map::Point;

pub struct CloseList {
    points: Vec<Vec<bool>>,
}

impl CloseList {
    #[inline]
    pub fn new(col: usize, row: usize) -> Self {
        CloseList {
            points: vec![vec![false; col]; row],
        }
    }

    #[inline]
    pub fn insert(&mut self, point: &Point) {
        self.points[point.y as usize][point.x as usize] = true;
    }
}