From 6deabe9039b60de3c6d7c7a87a6a1a5f364af7ff Mon Sep 17 00:00:00 2001 From: fdai7729 Date: Fri, 2 Feb 2024 17:52:14 +0000 Subject: [PATCH] Update src/main/c/Template/Battleship_game.c --- src/main/c/Template/Battleship_game.c | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/main/c/Template/Battleship_game.c b/src/main/c/Template/Battleship_game.c index 9524763..e9bf2e5 100644 --- a/src/main/c/Template/Battleship_game.c +++ b/src/main/c/Template/Battleship_game.c @@ -41,6 +41,10 @@ int singleplayer() { int multiplayer() { char multi[100]; + char player1[100]; + char player2[100]; + char ships1[100]; + char ships2[100]; for (int i = 0; i <= 99; i++) { @@ -48,6 +52,30 @@ int multiplayer() { } + for (int i = 0; i <= 99; i++) { + + player1[i] = 'X'; + + } + + for (int i = 0; i <= 99; i++) { + + player2[i] = 'X'; + + } + + for (int i = 0; i <= 99; i++) { + + ships1[i] = 'X'; + + } + + for (int i = 0; i <= 99; i++) { + + ships2[i] = 'X'; + + } + !feld(multi);