|
@ -136,24 +136,21 @@ void loadLevel(int lvlnum) |
|
|
|
|
|
|
|
|
int main() |
|
|
int main() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
loadLevel(lvlnumber); |
|
|
loadLevel(lvlnumber); |
|
|
while (1) |
|
|
while (1) |
|
|
{ |
|
|
{ |
|
|
clearField(); |
|
|
clearField(); |
|
|
field[ballX][ballY -= 1] = 'O'; |
|
|
field[ballX][ballY -= 1] = 'O'; |
|
|
generateField(); |
|
|
generateField(); |
|
|
|
|
|
|
|
|
int Ball_In_Bin = checkBallPosition(); |
|
|
int Ball_In_Bin = checkBallPosition(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (Ball_In_Bin) |
|
|
switch (Ball_In_Bin) |
|
|
{ |
|
|
{ |
|
|
case (1): |
|
|
case (1): |
|
|
ScorePoints += 50; |
|
|
ScorePoints += 50; |
|
|
loadLevel(++lvlnumber); |
|
|
loadLevel(++lvlnumber); |
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case(2): |
|
|
case(2): |
|
|
ScorePoints -= 5; |
|
|
ScorePoints -= 5; |
|
|
lifeCount--; |
|
|
lifeCount--; |
|
@ -167,22 +164,19 @@ int main() |
|
|
scanf(" %c", &choice); |
|
|
scanf(" %c", &choice); |
|
|
system("start \"\" \"https://youtu.be/dQw4w9WgXcQ\""); |
|
|
system("start \"\" \"https://youtu.be/dQw4w9WgXcQ\""); |
|
|
return 0; |
|
|
return 0; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
addScoreboard(); |
|
|
addScoreboard(); |
|
|
sortScoreboard(); |
|
|
sortScoreboard(); |
|
|
return 0; |
|
|
return 0; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
loadLevel(lvlnumber); |
|
|
loadLevel(lvlnumber); |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
Ball_In_Bin = 0; |
|
|
Ball_In_Bin = 0; |
|
|
|
|
|
|
|
|
sleep(1); |
|
|
sleep(1); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void getStartPosition() |
|
|
void getStartPosition() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|