Creepy-simulation
 
Loading...
Searching...
No Matches
creeper_drawer.CreepersManager Class Reference

Public Member Functions

 __init__ (self, app, manager, position_shift)
 
 update_creepers (self, steps)
 
 draw_creepers (self, drawer)
 

Public Attributes

 manager
 
 shift
 
 creepers
 

Protected Member Functions

 _creepers2data (self, creepers)
 

Detailed Description

@class CreepersManager
@brief Handles the collection of creepers and their interactions.

The CreepersManager class manages a collection of CreeperDrawer objects,
updating their states and rendering them within the simulation.

Constructor & Destructor Documentation

◆ __init__()

creeper_drawer.CreepersManager.__init__ (   self,
  app,
  manager,
  position_shift 
)
Initializes the CreepersManager object.

@param app: The application managing the simulation.
@param manager: The underlying creepers manager from the simulation library.
@param position_shift: The positional offset for rendering creepers.

Member Function Documentation

◆ _creepers2data()

creeper_drawer.CreepersManager._creepers2data (   self,
  creepers 
)
protected
Converts creepers data into coordinates and states, applying positional shift.

@param creepers: The list of creepers from the simulation library.
@return: A generator yielding shifted coordinates and states for each creeper.

◆ draw_creepers()

creeper_drawer.CreepersManager.draw_creepers (   self,
  drawer 
)
Renders all creepers on the provided drawer surface.

@param drawer: The drawing surface or manager responsible for rendering.

◆ update_creepers()

creeper_drawer.CreepersManager.update_creepers (   self,
  steps 
)
Updates the states and positions of all creepers.

@param steps: The number of steps for updating creeper positions.

Member Data Documentation

◆ creepers

creeper_drawer.CreepersManager.creepers

◆ manager

creeper_drawer.CreepersManager.manager

◆ shift

creeper_drawer.CreepersManager.shift

The documentation for this class was generated from the following file: