douglascdev / douglascdev/snake
Use one sprite object for all objects of the same class
Open
enhancement
- Dominant language
- Python
- Stars
- 4
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.