|
|
@ -3,6 +3,7 @@ |
|
|
|
#include <stdbool.h> |
|
|
|
#include <time.h> |
|
|
|
#include "minesweeper_start.h" |
|
|
|
|
|
|
|
#pragma region defines |
|
|
|
#define BLOCK '#' |
|
|
|
#define FLAG 'x' |
|
|
@ -15,7 +16,6 @@ |
|
|
|
#define HARD 3 |
|
|
|
#pragma endregion |
|
|
|
|
|
|
|
|
|
|
|
#pragma region Funktion_heads |
|
|
|
void main_menu_minesweeper(); |
|
|
|
void game_minesweeper(); |
|
|
@ -120,7 +120,7 @@ void options_minesweeper(){ |
|
|
|
|
|
|
|
switch (option){ |
|
|
|
case 1: |
|
|
|
printf("Bitte neu Schwierigkeit eingeben (1 - 3): "); |
|
|
|
printf("Bitte neue Schwierigkeit eingeben (1 - 3): "); |
|
|
|
scanf("%d", &num_bombs); |
|
|
|
getchar(); |
|
|
|
num_bombs = num_bombs == 1 ? EASY : num_bombs == 2 ? NORMAL : HARD; |
|
|
@ -128,7 +128,7 @@ void options_minesweeper(){ |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
num_bombs = num_bombs < width * height / NORMAL ? EASY : num_bombs == width * height / NORMAL ? NORMAL : HARD; |
|
|
|
printf("Bitte neu Groesse eingeben (1 - 3): "); |
|
|
|
printf("Bitte neue Groesse eingeben (1 - 3): "); |
|
|
|
scanf("%d", &width); |
|
|
|
getchar(); |
|
|
|
width = width == 1 ? SMALL : width == 2 ? MIDDLE : LARGE; |
|
|
|