Browse Source

Spielfeld wird generiert

main
David PC Saiz 2 years ago
parent
commit
1e6561af27
  1. BIN
      build/artifacts/release/Paper-Bin.out
  2. BIN
      build/release/Paper-Bin.out
  3. BIN
      build/release/out/c/Paper-Bin.o
  4. 33
      src/Paper-Bin.c

BIN
build/artifacts/release/Paper-Bin.out

BIN
build/release/Paper-Bin.out

BIN
build/release/out/c/Paper-Bin.o

33
src/Paper-Bin.c

@ -1,7 +1,36 @@
#include <stdio.h> #include <stdio.h>
char field[23][29];
int main() int main()
{ {
// printf() displays the string inside quotation
printf("Hello, World!");
while (1)
{
system("clear");
for (int i = 0; i < 23; i++)
{
for (int j = 0; j < 29; j++)
{
field[i][j] = ' ';
}
}
for (int i = 0; i < 29; i++)
{
printf("|");
for (int j = 0; j < 23; j++)
{
if (i == 0 || i == 29 - 1 || i == 2)
printf("=");
else
printf("%c", field[j][i]);
}
printf("|");
printf("\n");
}
sleep(1);
}
return 0; return 0;
} }
Loading…
Cancel
Save