Sean-Nishi / M1Wengine

A action-adventure game developed with Python 3.11.1 and pygame. Complete missions before timer expires.
3 stars 0 forks source link

Refactor level's create_entities_from_layout and create_items_from_layout #349

Open Sean-Nishi opened 8 months ago

Sean-Nishi commented 8 months ago

Create shared method that be called twice. Once for entities, once for items

Write a iterate_matrix method(). Iterates matrix then calls a callable called my_func(). Write a create_items_from layout() and create_entities_from_layout() methods then pass in those into iterate_matrix() so they can be called after iterating through the matrix