Simple grid-based minesweeper for the terminal in C