Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question Tree bot with duplicate branches

Joined
May 13, 2020
Messages
2
Hi, im new to bot writing but not knew to programming in general. I am trying to write a simple TreeBot but fleshing it out first on Draw.io to visual the branches and leafs. However i want to check if the inventory is full then later on down 2 more branches check if it is full again, since it will become full during one of the leafs actions. Would it be best practice to rearrange the logic to only include 1 inventory check only, or would having the same logic in a different class name be fine, or better yet a way to differentiate which check its looking for within the same class.

I feel like im being dumb with this one, but can't work it out for the sake of me.
 
The only AI bot developer
Joined
Mar 26, 2016
Messages
166
Join the RuneMate developer slack channel. I can not really make out,what you are saying. So i will have to guess. You would typically have one branch that validates whether your inventory is full. When your tree reaches a leaf node, it will loop again to the root node. So It is irrelevant that your inventory will become full during a leaf action.
 
Joined
May 13, 2020
Messages
2
Join the RuneMate developer slack channel. I can not really make out,what you are saying. So i will have to guess. You would typically have one branch that validates whether your inventory is full. When your tree reaches a leaf node, it will loop again to the root node. So It is irrelevant that your inventory will become full during a leaf action.
Perfect, I kinda figured it out by going back through my logic and realised that. I will join the slack though. Cheers
 
Top