Module plan
Plan Builder Internally holds a graph of Task Nodes which can be grown by using the methods.
Functions
place (player_id, position, name) | adds a PLACE node to graph If required first a WALK node is inserted to walk near the item to place |
group_end () | adds a GROUP END node to graph |
mine (player_id, position, name, count) | adds a MINE node to graph If required first a WALK node is inserted to walk near the item to mine |
task_graph_graphviz () | build graphviz from task graph |
walk (player_id, position, radius) | adds a WALK node to graph |
task_graph_mermaid_gantt () | build mermaid gantt from task graph |
group_start (label) | adds a GROUP START node to graph Groups are used to synchronize bots so their tasks are completed before the next group is started. |
Functions
- place (player_id, position, name)
-
adds a PLACE node to graph
If required first a WALK node is inserted to walk near the item to place
Parameters:
- player_id int id of player
- position types.Position
- name string name of item to place
Returns:
- group_end ()
- adds a GROUP END node to graph
- mine (player_id, position, name, count)
-
adds a MINE node to graph
If required first a WALK node is inserted to walk near the item to mine
Parameters:
- player_id int id of player
- position types.Position
- name string name of item to mine
- count int how many items to mine
- task_graph_graphviz ()
-
build graphviz from task graph
Returns:
-
string graphviz string
- walk (player_id, position, radius)
-
adds a WALK node to graph
Parameters:
- player_id int id of player
- position types.Position
- radius int how close to walk to
- task_graph_mermaid_gantt ()
-
build mermaid gantt from task graph
Returns:
-
string mermaid string
- group_start (label)
-
adds a GROUP START node to graph
Groups are used to synchronize bots so their tasks are completed before the next group is started.
Should be closed with group_end.
Parameters:
- label string label of group