pathfinding/map/list.rs
1use crate::map::Point;
2
3pub struct CloseList {
4 points: Vec<Vec<bool>>,
5}
6
7impl CloseList {
8 #[inline]
9 pub fn new(col: usize, row: usize) -> Self {
10 CloseList {
11 points: vec![vec![false; col]; row],
12 }
13 }
14
15 #[inline]
16 pub fn insert(&mut self, point: &Point) {
17 self.points[point.y as usize][point.x as usize] = true;
18 }
19}