From 07f04b916782ef759431fe6a9df1faaebb4e3547 Mon Sep 17 00:00:00 2001 From: Daniel M Date: Thu, 8 Feb 2024 11:18:29 +0100 Subject: [PATCH] startgame --- src/main/duellist-spielesammlung-projekt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/duellist-spielesammlung-projekt.c b/src/main/duellist-spielesammlung-projekt.c index 9aa1d88..a3f70a9 100644 --- a/src/main/duellist-spielesammlung-projekt.c +++ b/src/main/duellist-spielesammlung-projekt.c @@ -310,6 +310,17 @@ int minesweeper() { char** minefield = create_minefield(height, width, unknown_character); char** mines = create_minefield(height, width, 0); distribute_mines(mines, height, width, num_mines); + while (1) { + + printf("Enter 'row column' to uncover (to quit enter '0 0'):\n"); + if (scanf("%d %d", &row, &column) != 2) { + printf("Incorrect input!\n"); + return 1; + } + + row--; + column--; + return 1; }