From 85bbb6ad66ad75f4fb0eb3d5700b3ef1b8787af4 Mon Sep 17 00:00:00 2001 From: fdai7729 Date: Tue, 6 Feb 2024 15:08:37 +0000 Subject: [PATCH] Update src/main/c/Template/Battleship_game.c --- src/main/c/Template/Battleship_game.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/c/Template/Battleship_game.c b/src/main/c/Template/Battleship_game.c index 315a2aa..31faf5f 100644 --- a/src/main/c/Template/Battleship_game.c +++ b/src/main/c/Template/Battleship_game.c @@ -115,15 +115,22 @@ int multiplayer() { !feld(multi); - for (int i = 0; i <= 16; i++) { + int k = 1; - printf("Player 1, platziere deine Schiffe."); + do + { + + printf("Player 1, platziere deine Schiffe.\nKoordinate: "); scanf("%c%d", &letco, &numco); coor = convertcoor(letco, numco); ships1[coor] = 'X'; + !feld(ships1); + + k++; + } while (k < 17); return 0; }