return 1 revealCell

master
thunic 2 years ago
parent 3dcb73fb4e
commit 8535b94b00

@ -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 // Überprüfen, ob die Position im gültigen Bereich liegt
if (pos.row < 0 || pos.row >= size || pos.col < 0 || pos.col >= size) { 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 // Überprüfen, ob die Zelle bereits aufgedeckt ist
if (hiddenGameBoard[pos.row][pos.col] != HIDDEN_CELL) { if (hiddenGameBoard[pos.row][pos.col] != HIDDEN_CELL) {
printf("Position bereits aufgedeckt\n"); return 1;
} }
if (gameBoard[pos.row][pos.col] == BOMB_CELL) { if (gameBoard[pos.row][pos.col] == BOMB_CELL) {
handleBombExploded(); handleBombExploded();

Loading…
Cancel
Save