|
|
@ -17,7 +17,7 @@ int binY = 10; |
|
|
|
|
|
|
|
char field[fieldWidth][fieldHeigth]; |
|
|
|
int windForce = 0; |
|
|
|
int ScorePoints = 0; |
|
|
|
int scorePoints = 0; |
|
|
|
|
|
|
|
int lifeCount = 3; |
|
|
|
int ballX = -1; |
|
|
@ -156,12 +156,12 @@ int main() |
|
|
|
switch (ball_In_Bin) |
|
|
|
{ |
|
|
|
case (1): |
|
|
|
ScorePoints += 50; |
|
|
|
scorePoints += 50; |
|
|
|
loadLevel(++lvlnumber); |
|
|
|
break; |
|
|
|
|
|
|
|
case(2): |
|
|
|
ScorePoints -= 5; |
|
|
|
scorePoints -= 5; |
|
|
|
lifeCount--; |
|
|
|
if (lifeCount < 1) |
|
|
|
{ |
|
|
@ -228,10 +228,10 @@ void generateField() |
|
|
|
system("clear"); |
|
|
|
buildBin(binX, binY); |
|
|
|
|
|
|
|
if (ScorePoints < 0) |
|
|
|
ScorePoints = 0; |
|
|
|
if (scorePoints < 0) |
|
|
|
scorePoints = 0; |
|
|
|
|
|
|
|
int tmp = ScorePoints; |
|
|
|
int tmp = scorePoints; |
|
|
|
field[12][1] = '0' + tmp % 10; |
|
|
|
|
|
|
|
tmp /= 10; |
|
|
@ -289,7 +289,7 @@ void addScoreboard() |
|
|
|
printf("Bitte gib deinen Namen ein:\n"); |
|
|
|
scanf("%s", name); |
|
|
|
|
|
|
|
fprintf(fp, "%s %d\n", name, ScorePoints); |
|
|
|
fprintf(fp, "%s %d\n", name, scorePoints); |
|
|
|
fclose(fp); |
|
|
|
} |
|
|
|
|
|
|
|