From 3073c64b17eaf395b2604f73e3c5aa3ffb754482 Mon Sep 17 00:00:00 2001 From: fdai7729 Date: Wed, 7 Feb 2024 02:16:34 +0000 Subject: [PATCH] Update src/main/c/Template/Battleship_game.c --- src/main/c/Template/Battleship_game.c | 29 ++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/main/c/Template/Battleship_game.c b/src/main/c/Template/Battleship_game.c index 9be5bec..cb7514c 100644 --- a/src/main/c/Template/Battleship_game.c +++ b/src/main/c/Template/Battleship_game.c @@ -69,7 +69,34 @@ int convertcoor(char a, int b) { int singleplayer() { + char player[100]; + char progplayer[100]; + char ships1[100]; + char ships2[100]; + + for (int i = 0; i <= 99; i++) { + + player[i] = '0'; + + } + + for (int i = 0; i <= 99; i++) { + + progplayer[i] = '0'; + + } + for (int i = 0; i <= 99; i++) { + + ships1[i] = '0'; + + } + + for (int i = 0; i <= 99; i++) { + + ships2[i] = '0'; + + } } @@ -411,7 +438,7 @@ int main() { int player; - printf("*Schiffeversenken*\n\n Single player: Drück <1>\n Multiplayer: Drück <2>\n"); + printf("*Schiffeversenken*\n\n Single player: Drueck <1>\n Multiplayer: Drueck <2>\n"); scanf("%d", &player); if (player == 1) {