Making a simple game engine to practice structure of code