Skip to content
Snippets Groups Projects
Commit 77e99a63 authored by tanguy.cavagna's avatar tanguy.cavagna :desktop:
Browse files

End turn fixes

parent bb49203e
Branches
No related tags found
No related merge requests found
......@@ -34,4 +34,4 @@ int main(void) {
// printf("%s\n", w);
// return EXIT_SUCCESS;
// }
\ No newline at end of file
// }
......@@ -263,4 +263,4 @@ void save_computed_matches(possibility_t **matches) {
int get_remaining_bank_count() { return remaining_bank_count; }
char **get_remaining_bank() { return remaining_bank; }
\ No newline at end of file
char **get_remaining_bank() { return remaining_bank; }
......@@ -66,7 +66,7 @@ void handle_controls(int key) {
current_try_letter_id = 0;
// Place correct letters from previous in the current one
if (current_try_id < TRIES_COUNT) {
if (current_try_id < TRIES_COUNT && strcmp(tries[current_try_id - 1], get_answer()) != 0) {
for (int i = 0; i < WORD_LENGHT; i++) {
if (patterns[current_try_id - 1][i] == CORRECT)
tries[current_try_id][i] = tries[current_try_id - 1][i];
......@@ -269,4 +269,4 @@ void launch_game() {
destroy_game();
}
bool game_finished() { return _game_finished; }
\ No newline at end of file
bool game_finished() { return _game_finished; }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment