Skip to content

Use one sprite object for all objects of the same class #16

@douglascdev

Description

@douglascdev

The attribute self.image of each class is created when each object is instanced, for SnakeUnits and Food. That means there is a lot equal images stored in memory.
Create a image when the first object is created, then reference that object for every instance of the same class created after that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions