This commit is contained in:
Mylloon 2023-02-21 13:24:15 +01:00
parent 0500215eda
commit d6d2c5def5
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -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;