From d1f6eef6764370beee92afa8cc1e1794bb50f09e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophyl=20Hoguet?= Date: Tue, 15 Feb 2022 14:33:13 +0100 Subject: [PATCH 1/3] clang --- game_test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/game_test.c b/game_test.c index 08b6139..3f767cb 100644 --- a/game_test.c +++ b/game_test.c @@ -1151,7 +1151,6 @@ bool test_game_load(bool whoami, char** name) { game dsolution = game_default_solution(); game_save(dsolution, "dsolution.txt"); game dsolution2 = game_load("dsolution.txt"); - assert(game_equal(dsolution, dsolution2)); game_delete(dsolution2); game_delete(dsolution); From 6612a3299e8cfc9f90993883ba1f05794241bfa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophyl=20Hoguet?= Date: Tue, 15 Feb 2022 14:36:37 +0100 Subject: [PATCH 2/3] clang udapte message commit not too short From c5050c97ef2e1b974b5bfeec03584e250b6d1b3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophyl=20Hoguet?= Date: Tue, 15 Feb 2022 16:27:39 +0100 Subject: [PATCH 3/3] update game tools td11 --- game_tools.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/game_tools.h b/game_tools.h index ab176d3..3d045c3 100644 --- a/game_tools.h +++ b/game_tools.h @@ -2,7 +2,7 @@ * @file game_tools.h * @brief Game Tools. * @details See @ref index for further details. - * @copyright University of Bordeaux. All rights reserved, 2020. + * @copyright University of Bordeaux. All rights reserved, 2021. * **/ @@ -19,9 +19,9 @@ */ /** - * @brief Creates a game by loading its description in a text file. + * @brief Creates a game by loading its description from a text file. * @details See the file format description in @ref index. - * @param filename + * @param filename input file * @return the loaded game **/ game game_load(char* filename); @@ -34,6 +34,22 @@ game game_load(char* filename); **/ void game_save(cgame g, char* filename); +/** + * @brief Computes the solution of a given game + * @param g the game to solve + * @details The game @p g is updated with the first solution found. If there are + * no solution for this game, @p g must be unchanged. + * @return true if a solution is found, false otherwise + */ +bool game_solve(game g); + +/** + * @brief Computes the total number of solutions of a given game. + * @param g the game + * @return the number of solutions + */ +uint game_nb_solutions(game g); + /** * @} */