|
|
@ -6,6 +6,7 @@ |
|
|
|
#define fieldHeigth 29 |
|
|
|
|
|
|
|
#pragma region VarDeclaration |
|
|
|
|
|
|
|
//Vertikale Startposition der Wand im Array |
|
|
|
int wallX = 0; |
|
|
|
//Horizontale Startposition der Wand im Array |
|
|
@ -28,6 +29,7 @@ int lvlnumber = 1; |
|
|
|
#pragma endregion |
|
|
|
|
|
|
|
#pragma region FunctionDeclaration |
|
|
|
|
|
|
|
void addScoreboard(); |
|
|
|
void clearField(); |
|
|
|
void generateField(); |
|
|
@ -35,6 +37,7 @@ void sortScoreboard(); |
|
|
|
void buildBin(int width, int height); |
|
|
|
void getStartPosition(); |
|
|
|
int checkBallPosition(); |
|
|
|
|
|
|
|
#pragma endregion |
|
|
|
|
|
|
|
//Ein struct für den Spieler erstellt um |
|
|
@ -43,7 +46,7 @@ struct Player |
|
|
|
{ |
|
|
|
char Name[50]; |
|
|
|
int Points; |
|
|
|
}playerlist[11]; |
|
|
|
} playerlist[11]; |
|
|
|
|
|
|
|
//Methode die den Eimer erstellt |
|
|
|
void buildBin(int width, int heigth) |
|
|
@ -160,7 +163,7 @@ int main() |
|
|
|
loadLevel(++lvlnumber); |
|
|
|
break; |
|
|
|
|
|
|
|
case(2): |
|
|
|
case (2): |
|
|
|
scorePoints -= 5; |
|
|
|
lifeCount--; |
|
|
|
if (lifeCount < 1) |
|
|
@ -195,8 +198,9 @@ void getStartPosition() |
|
|
|
{ |
|
|
|
field[i][ballY] = j + '0'; |
|
|
|
} |
|
|
|
generateField(); |
|
|
|
//printf("W\x84\hle die position des Balls (0-9):\n"); |
|
|
|
generateField(); |
|
|
|
|
|
|
|
//printf("W\x84\hle die position des Balls (0-9):\n"); |
|
|
|
printf("Wähle die position des Balls (0-9):\n"); |
|
|
|
|
|
|
|
scanf("%d", &ballX); |
|
|
@ -258,6 +262,7 @@ void generateField() |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (lvlnumber > 6 && windIntervall % 2 == 0) |
|
|
|
{ |
|
|
|
windForce < 0 ? (ballX -= windForce * -1) : (ballX += windForce); |
|
|
|