Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,17 @@ void show_win() {
reset();
}

void show_loose() {
void show_lose(char *correct_word) {
// cls();
char ans[12] = " Answer: ";
color(BLACK, BLACK, M_FILL);
box(0, 0, 160, 144, M_FILL);
gotogxy(0, 8);
color(WHITE, BLACK, M_NOFILL);
gprint(" You lost. Sorry!");
gotogxy(0, 10);
color(WHITE, BLACK, M_NOFILL);
gprint(strncat(ans, correct_word, 5));
waitpad(J_START | J_A);
reset();
}
Expand Down Expand Up @@ -338,7 +342,7 @@ void run_wordle(void)
break;
}
if(guess_nr == 6) {
show_loose();
show_lose(word);
return;
break;
}
Expand Down