|
|
|
|
@ -181,14 +181,11 @@ int revealCell(int** gameBoard, int** hiddenGameBoard, int size, int row, int co
|
|
|
|
|
|
|
|
|
|
// Überprüfen, ob die Position im gültigen Bereich liegt
|
|
|
|
|
if (pos.row < 0 || pos.row >= size || pos.col < 0 || pos.col >= size) {
|
|
|
|
|
printf("Ungültige Position\n");
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Überprüfen, ob die Zelle bereits aufgedeckt ist
|
|
|
|
|
if (hiddenGameBoard[pos.row][pos.col] != HIDDEN_CELL) {
|
|
|
|
|
printf("Position bereits aufgedeckt\n");
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
if (gameBoard[pos.row][pos.col] == BOMB_CELL) {
|
|
|
|
|
handleBombExploded();
|
|
|
|
|
|