put some comments for guidance, only 4 lines are not needed.

line 258 (void grow()) - 4 statements are off. commented out statements that aren't needed (tested and it works without them).  The statements are overwritting themselves, so check the logic for them.

line 331 (void turn(char input, int map_height)) - KEY_ESC and '[' just exit the function, not sure if you wanted them to act like 'q' or to act like "default".

line 465 (void wait_for_key(char k, bool any)) - using getch() multiple times in if statements could cause undesired affects.  Normally a local variable is used to hold what getch returns then checked.  any && getch() only pulls from getch if any is true, if getch then returns NULL or 0 or anything false, then it will be pulled from again and can cause a seg fault or other undesired affects.

line 522 (double my_sqrt(float n)) - changed while loop to a for loop.