summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 71c1ea7..c585b45 100644
--- a/src/main.c
+++ b/src/main.c
@@ -97,6 +97,7 @@ static void map_alloc(map_t *map,size_t width,size_t height,char const *init){
for(size_t y = 0;y < map->height;y++) cell_init(MAP_CELL(map,map->width-1,y ),' ');
drill_max = (map->width/DRILL_DIM_MIN)*(map->height/DRILL_DIM_MIN);
map->drill = malloc(sizeof(drill_t)*drill_max);
+ if(!map->drill) fail();
map->drill_cnt = 0;
map->ore_cnt = 0;
}
@@ -280,6 +281,7 @@ int main(int argc,char **argv){
" oooooooooo "
" ooooo ");
+ /*
map_alloc(&map,10,10, "oooooooooo"
"oooooooooo"
"oooooooooo"
@@ -290,8 +292,9 @@ int main(int argc,char **argv){
"oooooooooo"
"oooooooooo"
"oooooooooo");
+ */
- while(map_drill_auto(&map,3));
+ while(map_drill_auto(&map,2));
map_print(&map);
printf("drils total %zu\n",map.drill_cnt);
printf("ore total %zu\n",map.ore_cnt);