Browse Source

41 Text einfärben

remotes/origin/Simon
Simon Hildebrandt 11 months ago
parent
commit
e9c0a6ec86
  1. 10
      src/main/c/TicTacToe.c

10
src/main/c/TicTacToe.c

@ -25,7 +25,15 @@ void Bild(char Feld[3][3]) {
#endif
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
printf("%c ", Feld[i][j]);
if (Feld[i][j] == '_') {
printf(ANSI_COLOR_BRIGHT_YELLOW"%c "ANSI_COLOR_RESET, Feld[i][j]);
}
else if (Feld[i][j] == 'X') {
printf(ANSI_COLOR_BRIGHT_CYAN"%c "ANSI_COLOR_RESET, Feld[i][j]);
}
else {
printf(ANSI_COLOR_BRIGHT_RED"%c "ANSI_COLOR_RESET, Feld[i][j]);
}
}
printf("\n");
}

Loading…
Cancel
Save