diff --git a/src/main/c/Minesweeper/minesweeper_start.c b/src/main/c/Minesweeper/minesweeper_start.c index 298f61d..fd58cfe 100644 --- a/src/main/c/Minesweeper/minesweeper_start.c +++ b/src/main/c/Minesweeper/minesweeper_start.c @@ -74,13 +74,17 @@ void main_menu_minesweeper(){ void game_minesweeper(){ bool running = true; int x, y, t; + Minesweeper_Board board = initialize_minesweeper(); while (running){ - Minesweeper_Board board = initialize_minesweeper(); + system("clear"); draw_minesweeper(board); printf("Next turn (x, y, t(0 = open, 1 = flag)): "); scanf("%d %d %d", &x, &y, &t); getchar(); + if(t == 1){board.tiles[x + y * board.width] = board.tiles[x + y * board.width] == EMPTY ? EMPTY : board.tiles[x + y * board.width] == FLAG ? BLOCK : FLAG;} + + if (t == 2){break;} } }