From d6d2c5def513de75faad0c915d9e442e0cddb24d Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 21 Feb 2023 13:24:15 +0100 Subject: [PATCH] stupid --- TP1/C-Cpp/src/mysok.cpp | 3 +++ 1 file changed, 3 insertions(+) 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;