ethicalgardeners.action._ActionEnum¶
- class ethicalgardeners.action._ActionEnum(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
EnumCustom enum for actions.
- __init__(*args, **kwargs)[source]¶
Create the action enum.
This constructor initializes the action enum and extracts the flower type for planting actions.
Methods
Get a list of actions that do not involve planting flowers.
get_planting_action_for_type(flower_type)Returns the planting action corresponding to the specified flower type.
__init__(*args, **kwargs)Create the action enum.
- classmethod get_non_planting_actions()[source]¶
Get a list of actions that do not involve planting flowers.
- Returns:
A list of actions that do not involve planting flowers.
- Return type:
- classmethod get_planting_action_for_type(flower_type)[source]¶
Returns the planting action corresponding to the specified flower type.
- Parameters:
flower_type (int) – The index of the flower type (0, 1, 2, …).
- Returns:
The planting action for the specified flower type. None: If no corresponding action is found.
- Return type:
Enum member