themythicaldrago/SoftwareDesign — pull request #5 by abekim (2014-03-29 19:28:51+00:00)
Title: Graded Homework 6

Hey @themythicaldrago, @jenwei, @jmorris1993,

Awesome work with this game. I really enjoyed playing the game itself and I think you guys came really close to making the experience feel like the real thing. I have a few comments about your use of MVC (I assume that's what you were going for..?) and some fixes:

- To put it simply, it seems like you lack in your understanding of the MVC design pattern. You guys did an awesome job at identifying what the objects in your game should be (player, bomb, block, etc), but not how they should be implemented. The MVC pattern is designed to give structure to your code and divide the responsibility of each component; the first paragraph of its [Wikipedia page](http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) explains this fairly well.
- The biggest thing that stands out to me is how individual objects check for collision with other objects. An example of this is in the `update` method of the `Fire` class. This requires a `Fire` object to keep track of a player and blocks, which is outside its scope. The way I would have implemented this is by creating a controller that checks for interaction between the different models and updates the model. The view will then render your models. _If you want, I'd be happy to clarify later!_
- PyGame often makes it really hard to write clean (read: readable) code, hence there's more emphasis on documentation and high-level code structure. You have a lot of different components to your game that (IMO) should have been divided into different modules. You have one file that has ~1,000 lines of code, making it hard to follow along. :confused: I personally would have divided up into something like: models.py, view.py, controller.py, main.py. Doing this will also make it incredibly easy to avoid merge conflicts, which seems to have slowed you down a bit.
- I've identified the bug with bullets being left behind under the Files Changed tab, so check it out!
- Great extension with the power ups :smile:

Overall, I think the game was scoped well and nicely executed. Watch out for the general programming patterns and their implementations that I mentioned above, but you guys did an awesome job and I'm super proud. I know I'll be playing your game for the next few days (#new2048?).

Once you've read the comments (both on the PR and under files changed), make a comment to the pull request or send me/Diana an email, letting us know that you've checked them out. Afterwards, close the PR (and optionally delete the graded branch)

#### REMEMBER NOT TO MERGE THESE PRs!