David Moeller
11 months ago
5 changed files with 98 additions and 22 deletions
-
62src/main/c/Minesweeper/minesweeper_start.c
-
16src/main/c/Minesweeper/minesweeper_start.h
-
22src/main/c/Snake/snake_start.c
-
8src/main/c/Snake/snake_start.h
-
12src/main/c/main.c
@ -0,0 +1,62 @@ |
|||
#include <stdio.h> |
|||
#include <stdbool.h> |
|||
#define BLOCK 219 |
|||
#define FLAG '?' |
|||
#define EMPTY ' ' |
|||
|
|||
|
|||
#pragma region Funktion_heads |
|||
void main_menu_minesweeper(); |
|||
void game_minesweeper(); |
|||
void options_minesweeper(); |
|||
#pragma endregion |
|||
|
|||
#pragma region Global |
|||
#pragma endregion //Global |
|||
|
|||
|
|||
int minesweeper_start(){ |
|||
system("clear"); |
|||
main_menu_minesweeper(); |
|||
} |
|||
|
|||
void main_menu_minesweeper(){ |
|||
bool running = true; |
|||
while (running){ |
|||
int option = 0; |
|||
|
|||
system("clear"); |
|||
printf("Waehlen Sie eine Option:\n"); |
|||
printf("\t1.Start\n"); |
|||
printf("\t2.Options\n"); |
|||
printf("\t3.Exit\n"); |
|||
|
|||
scanf("%d", &option); |
|||
getchar(); |
|||
|
|||
system("clear"); |
|||
|
|||
switch (option){ |
|||
case 1: |
|||
game_minesweeper(); |
|||
break; |
|||
case 2: |
|||
options_minesweeper(); |
|||
break; |
|||
case 3: |
|||
running = false; |
|||
break; |
|||
|
|||
default: |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
|
|||
void game_minesweeper(){ |
|||
|
|||
} |
|||
|
|||
void options_minesweeper(){ |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
#ifndef MINESWEEPER_START_H |
|||
#define MINESWEEPER_START_H |
|||
|
|||
typedef struct Minesweeper_Board{ |
|||
unsigned int width; |
|||
unsigned int height; |
|||
char *tiles; |
|||
int num_bombs; |
|||
unsigned int bombs[]; |
|||
}Minesweeper_Board; |
|||
|
|||
|
|||
void minesweeper_start(); |
|||
|
|||
|
|||
#endif // MINESWEEPER_START_H |
Write
Preview
Loading…
Cancel
Save
Reference in new issue