Simlify and improve BT visualization

This commit is contained in:
2024-01-11 08:34:53 +01:00
parent 8043d56af9
commit 36d8bac7c4
5 changed files with 39 additions and 26 deletions

View File

@@ -203,6 +203,11 @@ BzBTNode *bzBTNodeNext(const BzBTNode *node) {
return node->next;
}
const BzBTNode *bzBTNodeStateGetNode(const BzBTNodeState *state) {
BZ_ASSERT(state);
return state->node;
}
const BzBTNodeState *bzBTNodeStateNext(const BzBTNodeState *state) {
BZ_ASSERT(state);
return state->next;

View File

@@ -92,6 +92,8 @@ BzBTNodeType bzBTGetNodeType(const BzBTNode *node);
BzBTNode *bzBTNodeChild(const BzBTNode *node);
BzBTNode *bzBTNodeNext(const BzBTNode *node);
const BzBTNode *bzBTNodeStateGetNode(const BzBTNodeState *state);
const BzBTNodeState *bzBTNodeStateNext(const BzBTNodeState *state);
bool bzBTNodeMatchesState(const BzBTNode *node, const BzBTNodeState *state);