Minor changes.

This commit is contained in:
metallaxis committed 2026-05-29 17:22:26 +03:00
1 parent 1caff1bc79
commit 07bb0fd7ed
3 files changed
+16 -10

No files matched your search

+4 -1
View File
@@ -72,6 +72,9 @@ bool run_bfs(int128_t* sum, int128_t a0, int128_t b0, int128_t c0, int print_mod
}
*sum+=max_moves;
if (print_mode == 1) free(moves);
if (print_mode == 1) {
free(moves);
moves = NULL;
}
return true;
}
+11 -9
View File
@@ -44,7 +44,14 @@ void node_pool_reset() {
}
void node_pool_destroy() {
if (pool) free(pool);
if (pool) {
free(pool);
pool = NULL;
}
if (visited_pool) {
free(visited_pool);
visited_pool = NULL;
}
}
int32_t node_pool_usage() {
@@ -84,18 +91,13 @@ void try_push_children(Node* curr) {
make_move('A', curr);
make_move('B', curr);
make_move('C', curr);
return;
}
if (last == 'A') {
} else if (last == 'A') {
make_move('C', curr);
make_move('B', curr);
}
else if (last == 'B') {
} else if (last == 'B') {
make_move('C', curr);
make_move('A', curr);
}
else if (last == 'C') {
} else if (last == 'C') {
make_move('B', curr);
make_move('A', curr);
}