From 6d2378395ca45a5cd29028d05d782fb19118fc48 Mon Sep 17 00:00:00 2001 From: thibault perrier Date: Thu, 6 Jan 2022 17:35:52 +0100 Subject: [PATCH] edit game_restart --- game.c | 2 +- game_text.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/game.c b/game.c index 13b6c28..5f5336e 100644 --- a/game.c +++ b/game.c @@ -271,5 +271,5 @@ void game_restart(game g) { } game_update_flags(g); history_delete_entire_history(g->hist); - g->hist = NULL; + g->hist = history_insert_first(history_create_empty(),F_ERROR,0,0); } diff --git a/game_text.c b/game_text.c index f2d8bce..8621ed1 100644 --- a/game_text.c +++ b/game_text.c @@ -78,7 +78,7 @@ int main(int argc, char* argv[]) { printf("Entrez une commande (h pour afficher l'aide): "); if (scanf(" %c", &c)) { if (c == 'h') { - printhelp(); + printhelp(); } else if (c == 'r') { game_restart(g); printf("Partie réinitialisé avec succes !\n");