Browse Source

Update src/main/c/Template/Battleship_game.c

remotes/origin/Battleship_game
fdai7729 11 months ago
parent
commit
3073c64b17
  1. 29
      src/main/c/Template/Battleship_game.c

29
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) {

Loading…
Cancel
Save