|
@ -61,19 +61,26 @@ int main() |
|
|
void getStartPosition() |
|
|
void getStartPosition() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
while (ballX == -1) |
|
|
|
|
|
|
|
|
while (Ballx == -1) |
|
|
{ |
|
|
{ |
|
|
for (int i = 2, j = 0; i <= 20; i += 2, j++) |
|
|
for (int i = 2, j = 0; i <= 20; i += 2, j++) |
|
|
{ |
|
|
{ |
|
|
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\x84\hle die position des Balls (0-9):\n"); |
|
|
printf("W\x84\hle die position des Balls (0-9):\n"); |
|
|
|
|
|
|
|
|
scanf("%d", &Ballx); |
|
|
scanf("%d", &Ballx); |
|
|
|
|
|
|
|
|
|
|
|
if (Ballx < 0 || 9 < Ballx) |
|
|
|
|
|
{ |
|
|
|
|
|
Ballx = -1; |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
Ballx = (Ballx + 1); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|