ça marche bof
This commit is contained in:
parent
243b3ed641
commit
e6742d54a0
3 changed files with 6 additions and 8 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
#define NBL 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 };
|
||||
|
||||
|
|
|
@ -100,8 +100,10 @@ void sok_board_t::load(char *_file) {
|
|||
}
|
||||
|
||||
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;
|
||||
for (int l = 0; l < NBL; ++l) {
|
||||
|
@ -294,8 +296,6 @@ int dfs(Node &result, int depth, std::vector<Node> history) {
|
|||
result = next_dfs;
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -356,8 +356,6 @@ int dfs(Node &result, int depth, std::vector<Node> history) {
|
|||
result = next_dfs;
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ int main(int _ac, char **_av) {
|
|||
std::cout << "Solution : " << result.path << "\n";
|
||||
}
|
||||
|
||||
// result.state.print_board();
|
||||
//result.state.print_board();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Reference in a new issue