ça marche bof

This commit is contained in:
César 2023-02-21 14:46:03 +01:00
parent 243b3ed641
commit e6742d54a0
3 changed files with 6 additions and 8 deletions

View file

@ -8,7 +8,7 @@
#define NBL 20 #define NBL 20
#define NBC 20 #define NBC 20
#define MAX_DEPTH 30 #define MAX_DEPTH 60
enum movement { MOVE_U = 0, MOVE_D, MOVE_L, MOVE_R, MOVE_W }; enum movement { MOVE_U = 0, MOVE_D, MOVE_L, MOVE_R, MOVE_W };

View file

@ -100,8 +100,10 @@ void sok_board_t::load(char *_file) {
} }
bool is_in_history(Node current, std::vector<Node> history) { bool is_in_history(Node current, std::vector<Node> history) {
for (ulong i = 0; i < history.size(); ++i) {
Node noeud = history[i]; //printf("Taille history : %d\n", history.size());
for (auto &noeud : history) {
int c = 0; int c = 0;
for (int l = 0; l < NBL; ++l) { for (int l = 0; l < NBL; ++l) {
@ -294,8 +296,6 @@ int dfs(Node &result, int depth, std::vector<Node> history) {
result = next_dfs; result = next_dfs;
return 0; return 0;
} }
} else {
return -1;
} }
} }
@ -356,8 +356,6 @@ int dfs(Node &result, int depth, std::vector<Node> history) {
result = next_dfs; result = next_dfs;
return 0; return 0;
} }
} else {
return -1;
} }
} }
} }