From 01132fd49eafd5c29f71b5b40105a7d4d643b420 Mon Sep 17 00:00:00 2001 From: fdai7729 Date: Fri, 9 Feb 2024 03:41:03 +0000 Subject: [PATCH] Update src/main/c/Template/Battleship_game.c --- src/main/c/Template/Battleship_game.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/c/Template/Battleship_game.c b/src/main/c/Template/Battleship_game.c index f44829d..50d9322 100644 --- a/src/main/c/Template/Battleship_game.c +++ b/src/main/c/Template/Battleship_game.c @@ -293,6 +293,18 @@ int singleplayer() { } } + if (ships1[coor] == 'X') { + progplayer[coor] = 'X'; + score2 += 1; + system("cls"); + printf("Treffer!!\n\n"); + } + else { + progplayer[coor] = '-'; + system("cls"); + printf("Kein Treffer.\n\n"); + } + if (score1 >= score2) { higherscore = score1; }