diff --git a/src/main/c/Template/Battleship_game.c b/src/main/c/Template/Battleship_game.c index a408c89..1ce9e01 100644 --- a/src/main/c/Template/Battleship_game.c +++ b/src/main/c/Template/Battleship_game.c @@ -226,7 +226,26 @@ int singleplayer() { !feld(ships1); + while (score1 || score2 < 16) { + + !feld(player); + printf("Player 1, gib eine Zielkoordinate ein: "); + scanf(" %c%d", &letco, &numco); + coor = convertcoor(letco, numco); + + if (ships2[coor] == 'X') { + player[coor] = 'X'; + score1 += 1; + printf("Treffer!!\n"); + } + else { + player[coor] = '-'; + printf("Kein Treffer.\n"); + } + } + + return 0; } int multiplayer() {