Skip to content

Commit 53c6012

Browse files
committed
fix: #12 issue
1 parent 9f89f88 commit 53c6012

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/main.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,15 @@ int main(const int argsLength, char* args[]) {
2525
return 1;
2626
};
2727

28-
// reprConfiguration(&config);
29-
// printf("\n");
30-
3128
strcpy(team.name, config.teamName);
3229

3330
printf("> %s team - A Tic-Tac-Toe game developed with C...", DEVELOPMENT_TEAM);
3431

3532
printf("\n\n> Available options:\n\n%s%s%s", " 1 - Play Tic-Tac-Toe.\n", " 2 - Show ranking.\n",
3633
" 0 - Exit.\n");
3734

38-
printf("\n> Select a option: ");
35+
printf("\n> Select an option: ");
36+
fflush(stdin);
3937
scanf("%d", &userInput);
4038

4139
while (userInput != 0) {
@@ -48,13 +46,14 @@ int main(const int argsLength, char* args[]) {
4846
printf("\n> [Showing ranking...]");
4947
break;
5048
default:
51-
printf("\n> [Invalid operation! Try again...]");
49+
printf("\n> Invalid option! Try again...");
5250
};
5351

5452
printf("\n\n> Available options:\n\n%s%s%s", " 1 - Play Tic-Tac-Toe.\n",
5553
" 2 - Show ranking.\n", " 0 - Exit.\n");
5654

57-
printf("\n> Select a option: ");
55+
printf("\n> Select an option: ");
56+
fflush(stdin);
5857
scanf("%d", &userInput);
5958
};
6059

0 commit comments

Comments
 (0)