From 2242f3122f6c80d46baab92a34df39706f6737b0 Mon Sep 17 00:00:00 2001 From: Christian Segundo Date: Mon, 12 Dec 2022 21:15:29 +0100 Subject: remove bogus condition --- day_12.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'day_12.zig') diff --git a/day_12.zig b/day_12.zig index c7a533e..b234173 100644 --- a/day_12.zig +++ b/day_12.zig @@ -56,8 +56,7 @@ fn bfs(allocator: std.mem.Allocator, grid: [][]const u8, start: []Point, end: Po if (!(p.row >= 0 and p.col >= 0 and p.row < grid.len and p.col < grid[0].len)) continue; if (visited.contains([_]i32{ p.row, p.col })) continue; - if (grid[@intCast(usize, point.row)][@intCast(usize, point.col)] != 'S' and grid[@intCast(usize, p.row)][@intCast(usize, p.col)] != 'E') - if (grid[@intCast(usize, p.row)][@intCast(usize, p.col)] > (grid[@intCast(usize, point.row)][@intCast(usize, point.col)] + 1)) continue; + if (grid[@intCast(usize, p.row)][@intCast(usize, p.col)] > (grid[@intCast(usize, point.row)][@intCast(usize, point.col)] + 1)) continue; queue.append(p) catch unreachable; } -- cgit v1.2.3