advent-of-code/2021/day-09/common.h
Patrick Auernig 4b895a6c66 Update solution for 2021 day 09
- close the file handle
- #define max map x and y values
2021-12-09 21:24:53 +01:00

18 lines
304 B
C

#pragma once
#define MAP_MAX_Y 100
#define MAP_MAX_X 100
extern int MAP_WIDTH;
extern int MAP_HEIGHT;
extern int MAP[MAP_MAX_Y][MAP_MAX_X];
typedef int (*result_fn)(int, int, int);
typedef int (*collect_fn)(int, int);
void read_file(char* path);
void print_map();
int with_low_point(result_fn fn);