diff --git a/Minesweeper/Core/Src/spielfeld.c b/Minesweeper/Core/Src/spielfeld.c index 537ded6..e1ed180 100644 --- a/Minesweeper/Core/Src/spielfeld.c +++ b/Minesweeper/Core/Src/spielfeld.c @@ -187,14 +187,13 @@ int revealCell(int** gameBoard, int** hiddenGameBoard, int size, int row, int co if (hiddenGameBoard[pos.row][pos.col] != HIDDEN_CELL) { return 1; } + if (gameBoard[pos.row][pos.col] == FLAG_CELL){ + return 1; + } if (gameBoard[pos.row][pos.col] == BOMB_CELL) { handleBombExploded(); return 0; } - if (gameBoard[pos.row][pos.col] == FLAG_CELL){ - return 1; - } - // Wenn die Zelle leer ist, müssen auch benachbarte leere Zellen aufgedeckt werden if (gameBoard[pos.row][pos.col] == EMPTY_CELL) { revealEmptyCells(gameBoard, hiddenGameBoard, size, pos);