Alien Invasion Game
As part of my self-taught Python journey, I wrote a game based on the Space Invaders arcade game as in the book listed below. I then wanted to challenge myself to refactor the code to implement a Model, View, Controller design pattern.
The original code was complete and working. I had to refactor the code to make it work with the new pattern. The main challenge was to figure out how to separate the game logic, display views and control logic since the classes and methods were intertwined.
Coding Reflections
- Originally coded this game following the chapters from Python Crash Course, 2nd Edition by Eric Matthes.
- Refactored it to implement a Model, View, Controller design pattern.
- Refactoring proved complicated due to the mixing of model, view, and controller logic in the original implementation.
Source Code
See source code at the repo on GitHub.