Monthly Archives: December 2019
The time has come to see our first design pattern: the Game Loop Pattern! This pattern can give us many good ideas to refactor our game in a very effective way.
It is now time to organize/refactor our code! When you begin, this is a strange process since the final code does the same as before. However, refactoring is the only way to create a code easy to maintain and expand.
In the previous post, the magic number is always the same. I propose now to introduce random numbers to change the magic number every time we launch the game. I also present imports and more on integers.
The source code of my book “Learn Design Pattern with Game Programming” is now available on github: https://github.com/philippehenri-gosselin/patternsgameprog. If you find any bug, comments here or issues on github are welcome 🙂