### Navigation

- index
- modules |
- next |
- previous |
- Grease v0.3 documentation »

# `grease` – Base Classes

class `grease.``System`

  Grease system abstract base class. Systems define behaviorial aspects of a `World`. All systems must define a `step()` method that is invoked by the world each timestep. User-defined systems are not required to subclass this class.

  See an example system from the tutorial.

  `set_world`(world)

    Bind the system to a world

  `step`(dt)

    Execute a time step for the system. Must be defined by all system classes.

    Parameters: | dt (float) – Time since last step invocation

  `world`

    The `World` this system belongs to

class `grease.``Renderer`

  Grease renderer abstract base class. Renderers define the presentation of a `World`. All renderers must define a `draw()` method that is invoked by the world when the display needs to be redrawn. User-defined renderers are not required to subclass this class.

  See an example renderer from the tutorial.

  `draw`()

    Issue drawing commands for this renderer. Must be defined for all renderer classes.

  `set_world`(world)

    Bind the system to a world

  `world`

    The `World` this renderer belongs to

## Other Base Classes

The following other common base classes can be imported from here for convenience:

- `World`
- `Entity`

### Navigation

- index
- modules |
- next |
- previous |
- Grease v0.3 documentation »