Skip to content

Commit 7ddcd3e

Browse files
committed
feature: improve user confirmation output
1 parent b6876e5 commit 7ddcd3e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/play/main.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ unsigned char playTicTacToe(const Configuration* config, char* localFilePath) {
1919
newList(&playersAfterMatch);
2020

2121
if (!requestPlayerNames(&players)) {
22-
printf("> Error! An error occurred on get player names.");
22+
printf("> Error! An error occurred on get player names.\n\n");
2323
return 0;
2424
};
2525

@@ -28,22 +28,19 @@ unsigned char playTicTacToe(const Configuration* config, char* localFilePath) {
2828
while (popElement(&players, &player, sizeof(player))) {
2929
printf("> Hi %s, now it's your turn to play...\n\n", player.name);
3030

31+
isPlayerReady(&player);
32+
3133
games = config->gamesPerPlayer;
3234
while (games > 0) {
3335
printf("> %d games remaining...\n\n", games);
3436

35-
isPlayerReady(&player);
3637
playGame(&player); // TODO: agregar printf() ganaste/perdiste.
3738

3839
games--;
3940
}
4041

4142
printf("> You won/lose the match! Your final score is %d.\n\n", player.points);
4243

43-
printf("> ");
44-
system("pause");
45-
puts("");
46-
4744
if (!pushElement(&playersAfterMatch, &player, sizeof(player))) return 0;
4845
}
4946

0 commit comments

Comments
 (0)