diff --git a/day15/c/day15_part2 b/day15/c/day15_part2 index 05503d9..bcda9ca 100755 Binary files a/day15/c/day15_part2 and b/day15/c/day15_part2 differ diff --git a/day15/c/day15_part2.c b/day15/c/day15_part2.c index 61270ae..4e931c0 100644 --- a/day15/c/day15_part2.c +++ b/day15/c/day15_part2.c @@ -180,10 +180,6 @@ int can_move(object_t ***map, int rows, int columns, int x, int y, int dir[2]) { } if (next_object->type == BOX) { - if (next_object->pos[0] != x) { - return can_move(map, rows, columns, next_object->pos[0], next_object->pos[1], dir) && can_move(map, rows, columns, next_object->pos[0], next_object->pos[1] + 1, dir); - } - int can = 1; if (map[x][y] != map[next_object->pos[0]][next_object->pos[1]]) { can &= can_move(map, rows, columns, next_object->pos[0], next_object->pos[1], dir);