Browse Source

Abfangen von falschen Eingaben eingefügt

main
fdai7037 2 years ago
parent
commit
dd1549d6f2
  1. 13
      src/Paper-Bin.c

13
src/Paper-Bin.c

@ -61,19 +61,26 @@ int main()
void getStartPosition()
{
while (ballX == -1)
while (Ballx == -1)
{
for (int i = 2, j = 0; i <= 20; i += 2, j++)
{
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");
scanf("%d", &Ballx);
if (Ballx < 0 || 9 < Ballx)
{
Ballx = -1;
continue;
}
Ballx = (Ballx + 1);
}
}

Loading…
Cancel
Save