From 11e8af8e1e3fc87e8e74a4403fa8b09690098367 Mon Sep 17 00:00:00 2001 From: Simon Hildebrandt Date: Wed, 7 Feb 2024 18:21:29 +0100 Subject: [PATCH] =?UTF-8?q?41=20Text=20einf=C3=A4rben?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/c/TicTacToe.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/c/TicTacToe.c b/src/main/c/TicTacToe.c index a01df1b..c1f9a33 100644 --- a/src/main/c/TicTacToe.c +++ b/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"); }