From 0ecc47c3e73540a4a1058e495786d53956ed5757 Mon Sep 17 00:00:00 2001 From: fdai7729 Date: Tue, 6 Feb 2024 15:12:14 +0000 Subject: [PATCH] Update src/main/c/Template/Battleship_game.c --- src/main/c/Template/Battleship_game.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/main/c/Template/Battleship_game.c b/src/main/c/Template/Battleship_game.c index 31faf5f..39f5a59 100644 --- a/src/main/c/Template/Battleship_game.c +++ b/src/main/c/Template/Battleship_game.c @@ -115,7 +115,7 @@ int multiplayer() { !feld(multi); - int k = 1; + int k1 = 1; do { @@ -128,9 +128,27 @@ int multiplayer() { ships1[coor] = 'X'; !feld(ships1); - k++; + k1++; - } while (k < 17); + } while (k1 < 17); + + + int k2 = 1; + + do + { + + printf("Player 2, platziere deine Schiffe.\nKoordinate: "); + scanf("%c%d", &letco, &numco); + + coor = convertcoor(letco, numco); + + ships1[50] = 'X'; + !feld(ships1); + + k2++; + + } while (k2 < 17); return 0; }