CaptainCoderOrg / CapMan

A Pac Man Inspired Game for Learning and Fun!
3 stars 4 forks source link

Refactor: Should `Game` should be refactored into multiple classes? #83

Open jcollard opened 6 months ago

jcollard commented 6 months ago

@smabuk mentioned "I have a first pass at the GameBuilder, but it has made me realise that the game architecture has some issues. The concept of Board and Game don't extend to Level. A level would have a board, and starting positions, behaviours and speeds - not at the game level"

And I agree.

I believe that Game should really be a "GameController" and there should be a separate data class, perhaps Level, that is the composition of the Board, Projectiles, and Enemies.

What are your thoughts @smabuk ? Do you have suggestions / would you be interested or have time to look at this? I think I should have some time today / tomorrow but I would really love to know how you might approach it.

smabuk commented 6 months ago

I think now that we understand the whole game better, storyboarding the flow from the start, through the levels until the game ends (not forgetting when and where we can change options) and the expected states at each transition, would give us a clear understanding of which objects are needed.