Inverter
dendron.decorators.inverter.Inverter
Bases: DecoratorNode
An Inverter decorator instructs its child node to tick() and
then returns the negation of the child's status as its own.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
`str`
|
The given name of this node. |
required |
child
|
`dendron.tree_node.TreeNode`
|
Optional child node. If |
None
|
Source code in src/dendron/decorators/inverter.py
tick()
Instruct the child node to execute its tick() function, and then
return SUCCESS if the child fails, and FAILURE if the child
succeeds. Returns RUNNING if the child returns RUNNING.