I am writing code for a roguelike game, and this portion of the code uses getch() to take a user input to direct the character as to where to move next. It is my understanding that getch() will pause the program until it receives an input from the user, but my code doesn't pause when it reaches the line. Here is the code
uint32_t pc_next_pos(dungeon *d)
{
char comm;
comm = getch();
command_move(d, comm);
}
The entire program compiles correctly, it is just that instead of pausing the program to let me move my character, it continues to go until the program terminates once all the monsters in the game die. That code is not included as it doesn't play a role in this method.
Am I doing something wrong in this method that doesn't allow getch() to pause the program, or am I misunderstanding what getch() does?