grid: use coord2d more consistently

This commit is contained in:
ktims committed 2024-12-21 21:01:16 -08:00
1 parent 13f61e3a2b
commit 02fc154547
6 files changed
+37 -15

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ impl TrailMap {
.iter()
.enumerate()
.filter(|(_, v)| **v == b'0')
.map(|(i, _v)| self.map.coord(i as i64).unwrap())
.map(|(i, _v)| self.map.coord(i as i64).unwrap().into())
.collect_vec()
}
fn count_reachable_from(&self, pos: &(i64, i64), needle: u8, visited: &mut Grid<bool>) -> u64 {