From 654f0288bd264c98cf8d193ba7baffcbbf023079 Mon Sep 17 00:00:00 2001 From: Sabina Grisi Date: Fri, 9 Feb 2024 22:29:29 +0100 Subject: [PATCH] =?UTF-8?q?f=C3=BCr=20Unentschieden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/TicTacToe.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/TicTacToe.c b/src/TicTacToe.c index 594c3fb..3ca6619 100644 --- a/src/TicTacToe.c +++ b/src/TicTacToe.c @@ -68,6 +68,10 @@ int main() { messages(player, '\0'); // Winner break; } + + if (i == 8) { + messages(3, '\0'); // Tie + } player = switchPlayer(player); @@ -202,6 +206,9 @@ void messages(int message, char player) { case 11: printf("\nPlayer O has won!\n\n"); break; + case 3: + printf("\nIt's a draw. Good game!\n\n"); + break; case 4: printf("\nPlayer %c, enter your move (1-9): ", player); break;