Skip to content

Commit

Permalink
Use GOAP's distance API in example
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinealb committed Aug 21, 2023
1 parent 54f7bf7 commit f86a78f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/goap/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ bool operator==(const LumberjackState& b, const LumberjackState& a)
struct ForestryGoal : goap::Goal<LumberjackState> {
int distance_to(const LumberjackState& state) const override
{
if (state.has_wood) {
return 0;
}
return 1;
return goap::Distance().shouldBeTrue(state.has_wood);
}
};

Expand Down

0 comments on commit f86a78f

Please sign in to comment.