Browse Source

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

remotes/origin/Battleship_game
fdai7729 11 months ago
parent
commit
a339d512a9
  1. 13
      src/main/c/Template/Battleship_game.c

13
src/main/c/Template/Battleship_game.c

@ -265,7 +265,7 @@ int singleplayer() {
while (higherscore < 17) { while (higherscore < 17) {
!feld(player); !feld(player);
printf("Runde %d\n\nScore: %d\n\nPlayer, gib eine Zielkoordinate ein: ", runde, score1);
printf("Runde %d\n\nDein Score: %d\n\nGegnerischer Score: %d\n\nPlayer, gib eine Zielkoordinate ein: ", runde, score1, score2);
scanf(" %c%d", &letco, &numco); scanf(" %c%d", &letco, &numco);
coor = convertcoor(letco, numco); coor = convertcoor(letco, numco);
@ -282,6 +282,17 @@ int singleplayer() {
printf("Kein Treffer.\n\n"); printf("Kein Treffer.\n\n");
} }
coor = hitgenerator();
int f = 0;
while (f != 1) {
if (progplayer[coor] == '0') {
f = 1;
}
}
if (score1 >= score2) { if (score1 >= score2) {
higherscore = score1; higherscore = score1;
} }

Loading…
Cancel
Save