plant¶
Defines the Plant and PlantPot classes.
- class pyskool.plant.Plant(plant_id, command_list_id, x, y)¶
A plant that grows when watered.
- Parameters:
plant_id – The ID of the plant.
command_list_id – The ID of the command list the plant will use.
x – The x-coordinate of the plant.
y – The y-coordinate of the plant.
- appear()¶
Make the plant appear half-grown. Anyone standing on the plant pot will be lifted.
- die()¶
Make the plant die. Anyone standing on the head of the plant will be dropped to the ground.
- finish_growing()¶
Make the plant appear fully grown. Anyone standing on the head of the plant will be lifted.
- get_command_list_id(lesson_id)¶
Return the ID of the command list used by the plant.
- Parameters:
lesson_id – The ID of the current lesson (ignored - plants do not follow a timetable).
- grow()¶
Make this plant start growing.
- head_coords()¶
Return the coordinates of the head of the plant.
- is_fully_grown()¶
Return whether the plant is fully grown.