Browse Source

2 display Board

remotes/origin/Simon
Simon Hildebrandt 11 months ago
parent
commit
2107498e6b
  1. 9
      src/main/c/TicTacToe.c

9
src/main/c/TicTacToe.c

@ -4,11 +4,18 @@
#include <string.h> #include <string.h>
// Funktion, um das Spielfeld zu initialisieren // Funktion, um das Spielfeld zu initialisieren
//1
void Brett(char Feld[3][3]) { void Brett(char Feld[3][3]) {
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) { for (int j = 0; j < 3; j++) {
Feld[i][j] = '_'; Feld[i][j] = '_';
} }
} }
}
void Bild(char Feld[3][3]) {
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
printf("%c ", Feld[i][j]);
}
printf("\n");
}
} }
Loading…
Cancel
Save