From dad0e7be89b8ab5433731da5e3636ff199c52f3a Mon Sep 17 00:00:00 2001 From: Sabina Grisi Date: Fri, 9 Feb 2024 16:27:53 +0100 Subject: [PATCH] =?UTF-8?q?Hinzuf=C3=BCgen=20von=20Positionsnummern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/TicTacToe.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/TicTacToe.c b/src/TicTacToe.c index 349ce96..a2b1675 100644 --- a/src/TicTacToe.c +++ b/src/TicTacToe.c @@ -2,14 +2,24 @@ #include "TicTacToe.h" int main() { + int pos1 = 1; + int pos2 = 2; + int pos3 = 3; + int pos4 = 4; + int pos5 = 5; + int pos6 = 6; + int pos7 = 7; + int pos8 = 8; + int pos9 = 9; + char vertical = '|'; char horizontal[] = "---"; printf("%c%s%c%s%c%s%c\n", vertical, horizontal, vertical, horizontal, vertical, horizontal, vertical); - printf("%c %c %c %c\n", vertical, vertical, vertical, vertical); + printf("%c %d %c %d %c %d %c\n", vertical, pos1, vertical, pos2, vertical, pos3, vertical); printf("%c%s%c%s%c%s%c\n", vertical, horizontal, vertical, horizontal, vertical, horizontal, vertical); - printf("%c %c %c %c\n", vertical, vertical, vertical, vertical); + printf("%c %d %c %d %c %d %c\n", vertical, pos4, vertical, pos5, vertical, pos6, vertical); printf("%c%s%c%s%c%s%c\n", vertical, horizontal, vertical, horizontal, vertical, horizontal, vertical); - printf("%c %c %c %c\n", vertical, vertical, vertical, vertical); + printf("%c %d %c %d %c %d %c\n", vertical, pos7, vertical, pos8, vertical, pos9, vertical); printf("%c%s%c%s%c%s%c\n", vertical, horizontal, vertical, horizontal, vertical, horizontal, vertical); } \ No newline at end of file