From e6fd7b648e1794f9f242b1617bb15e3e3c8083f7 Mon Sep 17 00:00:00 2001 From: "tanguy.cavagna" <tanguy.cavagna@etu.hesge.ch> Date: Fri, 3 Jun 2022 17:06:00 +0200 Subject: [PATCH] Fixed tool destroy when not used --- wordle/wordle.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wordle/wordle.c b/wordle/wordle.c index 1e1f680..f209bd5 100644 --- a/wordle/wordle.c +++ b/wordle/wordle.c @@ -137,8 +137,11 @@ void destroy_game() { } void restart_game() { - destroy_tool(); - init_tool(); + if (mode == TOOL_ASSISTED) { + destroy_tool(); + init_tool(); + } + score += (TRIES_COUNT - current_try_id) * 10; set_answer(get_random_word()); -- GitLab