Minesweeper for the terminal in C