From 095925fbb2bea2e14b6aff9273464dde44ebbaa4 Mon Sep 17 00:00:00 2001 From: Simon Hildebrandt Date: Wed, 7 Feb 2024 18:01:14 +0100 Subject: [PATCH] 29 Feldrand --- src/main/c/TicTacToe.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/c/TicTacToe.c b/src/main/c/TicTacToe.c index c8a72fb..67733fd 100644 --- a/src/main/c/TicTacToe.c +++ b/src/main/c/TicTacToe.c @@ -113,6 +113,12 @@ int mainx() { scanf("%d", &col); row -= 1; col -= 1; + if (row > 3 || col > 3) { + printf("Das ist nicht mehr im Feld. Versuch es nochmal:"); + scanf("%d %d", &row, &col); + row -= 1; //Für Index eins kleiner + col -= 1; + } Zuege(Feld, row, col); Zaehler++; }