Glacier150 / Blockfall

This is a simple game about falling blocks that takes very loose inspiration from James Bond.
MIT License
2 stars 0 forks source link

Refactor: Add player code and enemy code to classes #4

Open mariano-f-r opened 1 year ago

mariano-f-r commented 1 year ago

With the game now adding support for multiple enemies, I think it would be a good idea to encapsulate each enemy as an instance of an Enemy class. This way, each enemy has it's own easily containable attributes, such as x and y. Similarly, the Enemy class could have an update() method, which would allow for easy updating of enemy positions.

Glacier150 commented 1 year ago

This is a good idea and I'll get on it soon. It's probably best to do it sooner, so I can work more features around it, than later, when I have to work those classes around the features. PyGame also has a built in Sprite class, which I'll have to read the documentation for to determine whether I could make use of it, which I most likely will be able to.