diff --git a/TP1/C-Cpp/src/mysok.cpp b/TP1/C-Cpp/src/mysok.cpp index 5ad9450..62a58ba 100644 --- a/TP1/C-Cpp/src/mysok.cpp +++ b/TP1/C-Cpp/src/mysok.cpp @@ -303,6 +303,9 @@ int dfs(Node &result, int depth) { next.board[new_cx][new_cy] = next.board[new_cx][new_cy] == TARGET ? CRATE_ON_TARGET : CRATE_ON_FREE; + if (next.board[new_cx][new_cy] == CRATE_ON_TARGET) { + --next.num_crates_free; + } // Déplacement joueur, ancienne position next.board[man1_x][man1_y] = next.board[man1_x][man1_y] == MAN1_ON_TARGET ? TARGET : FREE;