|
@ -27,7 +27,7 @@ int lvlnumber = 1; |
|
|
#pragma region FunctionDeclaration |
|
|
#pragma region FunctionDeclaration |
|
|
void addScoreboard(); |
|
|
void addScoreboard(); |
|
|
void clearField(); |
|
|
void clearField(); |
|
|
void Generatefield(); |
|
|
|
|
|
|
|
|
void generateField(); |
|
|
void sortScoreboard(); |
|
|
void sortScoreboard(); |
|
|
void buildBin(int width, int height); |
|
|
void buildBin(int width, int height); |
|
|
void getStartPosition(); |
|
|
void getStartPosition(); |
|
@ -119,7 +119,7 @@ void loadLevel(int lvlnum) |
|
|
|
|
|
|
|
|
case(11): |
|
|
case(11): |
|
|
system("clear"); |
|
|
system("clear"); |
|
|
Generatefield(); |
|
|
|
|
|
|
|
|
generateField(); |
|
|
addScoreboard(); |
|
|
addScoreboard(); |
|
|
sortScoreboard(); |
|
|
sortScoreboard(); |
|
|
exit(0); |
|
|
exit(0); |
|
@ -142,7 +142,7 @@ int main() |
|
|
{ |
|
|
{ |
|
|
clearField(); |
|
|
clearField(); |
|
|
field[ballX][ballY -= 1] = 'O'; |
|
|
field[ballX][ballY -= 1] = 'O'; |
|
|
Generatefield(); |
|
|
|
|
|
|
|
|
generateField(); |
|
|
|
|
|
|
|
|
int Ball_In_Bin = checkBallPosition(); |
|
|
int Ball_In_Bin = checkBallPosition(); |
|
|
|
|
|
|
|
@ -192,7 +192,7 @@ void getStartPosition() |
|
|
{ |
|
|
{ |
|
|
field[i][ballY] = j + '0'; |
|
|
field[i][ballY] = j + '0'; |
|
|
} |
|
|
} |
|
|
Generatefield(); |
|
|
|
|
|
|
|
|
generateField(); |
|
|
//printf("W\x84\hle die position des Balls (0-9):\n"); |
|
|
//printf("W\x84\hle die position des Balls (0-9):\n"); |
|
|
printf("Wähle die position des Balls (0-9):\n"); |
|
|
printf("Wähle die position des Balls (0-9):\n"); |
|
|
|
|
|
|
|
@ -220,7 +220,7 @@ void clearField() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Generatefield() |
|
|
|
|
|
|
|
|
void generateField() |
|
|
{ |
|
|
{ |
|
|
system("clear"); |
|
|
system("clear"); |
|
|
buildBin(binX, binY); |
|
|
buildBin(binX, binY); |
|
|