fn bfs(input: &(Grid<u8>, Point), end: u8) -> u32
BFS algorithm implementation with the reversed height transition rules baked in.