fix failing tests

This commit is contained in:
ktims committed 2026-12-02 13:51:10 -07:00
1 parent b9478fbb6b
commit ba83989539
14 files changed
+51 -149

No files matched your search

+1 -3
View File
@@ -25,9 +25,7 @@ fn part2(input: &Grid<u8>) -> u64 {
let mut removed_iteration = 0;
for i in 0..grid.width() * grid.height() {
let pos = grid.coord(i as i64).unwrap();
if grid.get(&pos).is_some_and(|c| *c == b'@')
&& grid.adjacent_count(&pos, |c| *c == b'@') < 4
{
if grid.get(&pos).is_some_and(|c| *c == b'@') && grid.adjacent_count(&pos, |c| *c == b'@') < 4 {
// remove the roll
grid.set(&pos, b'.');
removed_iteration += 1;